--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: the associated bot
  name: bot
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: the message map handler
  name: handler
  rw: R
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: the plugin registry
  name: registry
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: BotModule is the base class for the modules that enhance the rbot functionality. Rather than subclassing BotModule, however, one should subclass either CoreBotModule (reserved for system modules) or Plugin (for user plugins).
- !ruby/struct:SM::Flow::P 
  body: A BotModule interacts with Irc events by defining one or more of the following methods, which get called as appropriate when the corresponding Irc event happens.
- !ruby/struct:SM::Flow::P 
  body: "map(template, options)::"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "map!(template, options):"
    body: "map is the new, cleaner way to respond to specific message formats without littering your plugin code with regexps, and should be used instead of #register() and #privmsg() (see below) when possible."
  - !ruby/struct:SM::Flow::P 
    body: The difference between map and map! is that map! will not register the new command as an alternative name for the plugin.
  - !ruby/struct:SM::Flow::P 
    body: "Examples:"
  - !ruby/struct:SM::Flow::VERB 
    body: "  plugin.map 'karmastats', :action =&gt; 'karma_stats'\n\n  # while in the plugin...\n  def karma_stats(m, params)\n    m.reply &quot;...&quot;\n  end\n\n  # the default action is the first component\n  plugin.map 'karma'\n\n  # attributes can be pulled out of the match string\n  plugin.map 'karma for :key'\n  plugin.map 'karma :key'\n\n  # while in the plugin...\n  def karma(m, params)\n    item = params[:key]\n    m.reply 'karma for #{item}'\n  end\n\n  # you can setup defaults, to make parameters optional\n  plugin.map 'karma :key', :defaults =&gt; {:key =&gt; 'defaultvalue'}\n\n  # the default auth check is also against the first component\n  # but that can be changed\n  plugin.map 'karmastats', :auth =&gt; 'karma'\n\n  # maps can be restricted to public or private message:\n  plugin.map 'karmastats', :private =&gt; false\n  plugin.map 'karmastats', :public =&gt; false\n"
  - !ruby/struct:SM::Flow::P 
    body: See MessageMapper#map for more information on the template format and the allowed options.
  - !ruby/struct:SM::Flow::LI 
    label: "listen(UserMessage):"
    body: Called for all messages of any type. To differentiate them, use message.kind_of? It'll be either a PrivMessage, NoticeMessage, KickMessage, QuitMessage, PartMessage, JoinMessage, NickMessage, etc.
  - !ruby/struct:SM::Flow::LI 
    label: "ctcp_listen(UserMessage):"
    body: Called for all messages that contain a CTCP command. Use message.ctcp to get the CTCP command, and message.message to get the parameter string. To reply, use message.ctcp_reply, which sends a private NOTICE to the sender.
  - !ruby/struct:SM::Flow::LI 
    label: "message(PrivMessage):"
    body: Called for all PRIVMSG. Hook on this method if you need to handle PRIVMSGs regardless of whether they are addressed to the bot or not, and regardless of
  - !ruby/struct:SM::Flow::LI 
    label: "privmsg(PrivMessage):"
    body: "Called for a PRIVMSG if the first word matches one the plugin #register()ed for. Use m.plugin to get that word and m.params for the rest of the message, if applicable."
  - !ruby/struct:SM::Flow::LI 
    label: "unreplied(PrivMessage):"
    body: Called for a PRIVMSG which has not been replied to.
  - !ruby/struct:SM::Flow::LI 
    label: "notice(NoticeMessage):"
    body: Called for all Notices. Please notice that in general should not be replied to.
  - !ruby/struct:SM::Flow::LI 
    label: "kick(KickMessage):"
    body: Called when a user (or the bot) is kicked from a channel the bot is in.
  - !ruby/struct:SM::Flow::LI 
    label: "invite(InviteMessage):"
    body: Called when the bot is invited to a channel.
  - !ruby/struct:SM::Flow::LI 
    label: "join(JoinMessage):"
    body: Called when a user (or the bot) joins a channel
  - !ruby/struct:SM::Flow::LI 
    label: "part(PartMessage):"
    body: Called when a user (or the bot) parts a channel
  - !ruby/struct:SM::Flow::LI 
    label: "quit(QuitMessage):"
    body: Called when a user (or the bot) quits IRC
  - !ruby/struct:SM::Flow::LI 
    label: "nick(NickMessage):"
    body: Called when a user (or the bot) changes Nick
  - !ruby/struct:SM::Flow::LI 
    label: "modechange(ModeChangeMessage):"
    body: Called when a User or Channel mode is changed
  - !ruby/struct:SM::Flow::LI 
    label: "topic(TopicMessage):"
    body: Called when a user (or the bot) changes a channel topic
  - !ruby/struct:SM::Flow::LI 
    label: "welcome(WelcomeMessage):"
    body: Called when the welcome message is received on joining a server succesfully.
  - !ruby/struct:SM::Flow::LI 
    label: "motd(MotdMessage):"
    body: Called when the Message Of The Day is fully recevied from the server.
  - !ruby/struct:SM::Flow::LI 
    label: "connect:"
    body: Called when a server is joined successfully, but before autojoin channels are joined (no params)
  - !ruby/struct:SM::Flow::LI 
    label: "set_language(String):"
    body: Called when the user sets a new language whose name is the given String
  - !ruby/struct:SM::Flow::LI 
    label: "save:"
    body: Called when you are required to save your plugin's state, if you maintain data between sessions
  - !ruby/struct:SM::Flow::LI 
    label: "cleanup:"
    body: called before your plugin is &quot;unloaded&quot;, prior to a plugin reload or bot quit - close any open files/connections or flush caches here
  type: :NOTE
constants: []

full_name: Irc::Bot::Plugins::BotModule
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: botmodule_class
- !ruby/object:RI::MethodSummary 
  name: call_event
- !ruby/object:RI::MethodSummary 
  name: cleanup
- !ruby/object:RI::MethodSummary 
  name: default_auth
- !ruby/object:RI::MethodSummary 
  name: do_map
- !ruby/object:RI::MethodSummary 
  name: flush_registry
- !ruby/object:RI::MethodSummary 
  name: handle
- !ruby/object:RI::MethodSummary 
  name: help
- !ruby/object:RI::MethodSummary 
  name: map
- !ruby/object:RI::MethodSummary 
  name: map!
- !ruby/object:RI::MethodSummary 
  name: name
- !ruby/object:RI::MethodSummary 
  name: priority
- !ruby/object:RI::MethodSummary 
  name: priority=
- !ruby/object:RI::MethodSummary 
  name: propose_default_path
- !ruby/object:RI::MethodSummary 
  name: register
- !ruby/object:RI::MethodSummary 
  name: to_s
- !ruby/object:RI::MethodSummary 
  name: to_sym
- !ruby/object:RI::MethodSummary 
  name: usage
name: BotModule
superclass: Object
