Class Irc::Keywords
In: lib/rbot/keywords.rb
Parent: Object

keywords class.

Handles all that stuff like "bot: foo is bar", "bot: foo?"

Fallback after core and auth have had a look at a message and refused to handle it, checks for a keyword command or lookup, otherwise the message is delegated to plugins

Methods

[]   has_key?   help   keyword   keyword_command   keyword_tell   new   oldsave   privmsg   rescan   save   scan   upgrade_data  

Public Class methods

create a new Keywords instance, associated to bot bot

Public Instance methods

lookup keyword key, return it or nil

does key exist as a keyword?

return help string for Keywords with option topic topic

m:PrivMessage containing message info
key:key being queried
dunno:optional, if true, reply "dunno" if key not found

handle a message asking about a keyword

handle a message which alters a keyword like "foo is bar", or "no, foo is baz", or "foo is also qux"

m:PrivMessage containing message info
target:channel/nick to tell about the keyword
key:key being queried

handle a message asking the bot to tell someone about a keyword

privmsg handler

drop static keywords and reload them from files, picking up any new keyword files that have been added

save dynamic keywords to file

load static keywords from files, picking up any new keyword files that have been added

upgrade data files found in old rbot formats to current

[Validate]