Google

"DTD/xhtml1-strict.dtd">
Class Irc::Plugins
In: rbot/plugins.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

class to manage multiple plugins and delegate messages to them for handling

Methods
bot    cleanup    delegate    help    helptopics    length    new    plugins    privmsg    rescan    save    scan   
Public Class methods
new(bot, dirlist)
bot:associated IrcBot class
dirlist:array of directories to scan (in order) for plugins

create a new plugin handler, scanning for plugins in dirlist

bot()

access to associated bot

plugins()

access to list of plugins

Public Instance methods
scan()

load plugins from pre-assigned list of directories

save()

call the save method for each active plugin

cleanup()

call the cleanup method for each active plugin

rescan()

drop all plugins and rescan plugins on disk calls save and cleanup for each plugin before dropping them

helptopics()

return list of help topics (plugin names)

length()
help(topic="")

return help for topic (call associated plugin's help method)

delegate(method, message)

see if each plugin handles method, and if so, call it, passing message as a parameter

privmsg(m)

see if we have a plugin that wants to handle this message, if so, pass it to the plugin and return true, otherwise false