Class: Irc::Plugins

Class Irc::Plugins |
In: | rbot/plugins.rb
Parent: | Object

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

Methods

bot bot bot bot bot bot bot bot bot bot bot

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)

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