Class: Irc::Keywords

Class Irc::Keywords |
In: | 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

[] [] [] [] [] [] [] [] [] [] [] []

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

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