lita-irc is an adapter for Lita that allows you to use the robot with IRC.
Add lita-irc to your Lita instance's Gemfile:
server(String) - The name of the IRC server Lita should connect to.
) - An array of channels Lita should join upon connection.
user(String) - The username for Lita's IRC account. Default:
password(String) - The password for Lita's IRC account. Default:
realname(String) - The "real name" field for Lita's IRC account. Default:
log_level(Symbol) - Sets the log level for Cinch's loggers. By default, Cinch's loggers are disabled. Default:
config.robot.name is used as Lita's IRC nickname.
config.adapters.irc.nick is ignored.
Additional Cinch options
Under the hood, lita-irc uses Cinch for the IRC connection. Cinch has several configuration options that you may want to set. To do this, assign a proc/lambda to
config.adapters.irc.cinch. lita-irc will yield the Cinch configuration object to the proc, so you can configure it as you'd like. Note that for the options listed in the sections above, those values will overwrite anything set in the proc.
Lita.configure do |config| config.robot.name = "Lita" config.robot.adapter = :irc config.adapters.irc.server = "irc.freenode.net" config.adapters.irc.channels = ["#litabot"] config.adapters.irc.user = "Lita" config.adapters.irc.realname = "Lita" config.adapters.irc.password = "secret" config.adapters.irc.cinch = lambda do |cinch_config| cinch_config.max_reconnect_delay = 123 end end
The IRC adapter will trigger the
:disconnected events when the robot has connected and disconnected from IRC, respectively. There is no payload data for either event.