smirc
A simple Ruby IRC client.
Features:
-
Message Queueing to prevent flood disconnects
-
Simple event handling
-
No DSL required, easy access to Irc#join and Irc#message
Example
= {
:server => "my.irc.net",
:nickname => "Hal",
:realname => "Daisy, Daisy",
:port => 6667,
}
@irc = Smirc::Client.new()
@irc.on(:connect) do |irc|
irc.join("#mychannel")
end
@irc.on(:message) do |irc, channel, , user|
case
when /open the bomb-bay doors/
irc.(channel, "I'm sorry, I cannot do that, Dave")
end
end
begin
@irc.connect
ensure
@irc.disconnect
end
Contributions and Credit
This gem is based heavily on ichverstehe’s Isaac gem. There’s no way this would be written without that gem as a reference.
Copyright
Copyright © 2009 Adam Pearson. See LICENSE for details.