"DTD/xhtml1-strict.dtd">
Class Irc::Keywords
In: rbot/keywords.rb
Parent: Object
Class: JoinMessage Class: PartMessage Class: Plugins Class: KickMessage Class: IrcAuth Class: IRCChannel Class: IrcSocket Class: BotConfig Class: Keywords Class: BotRegistryAccessor Class: IrcClient Class: DBHash Class: Language Class: TopicMessage Class: QuitMessage Class: PrivMessage Class: UserMessage Class: NoticeMessage Class: IrcBot Class: BasicUserMessage Class: NickMessage Class: Plugin Class: BotRegistry Class: Keyword Class: DBTree Module: Irc

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
new(bot)

create a new Keywords instance, associated to bot bot

Public Instance methods
rescan()

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

scan()

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

upgrade_data()

upgrade data files found in old rbot formats to current

save()

save dynamic keywords to file

oldsave()
[](key)

lookup keyword key, return it or nil

has_key?(key)

does key exist as a keyword?

keyword(m, key, dunno=true)
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

keyword_tell(m, target, key)
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

keyword_command(sourcenick, target, lhs, mhs, rhs, quiet=false)

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

help(topic="")

return help string for Keywords with option topic topic

privmsg(m)

privmsg handler