diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-09-02 07:16:17 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-09-02 07:16:17 +0000 |
commit | 414734f9872b1d60d2c92951965c0aba0cdf5884 (patch) | |
tree | 793e0decdc769d9c9e1f792c2b91078b8c44f4a8 /lib/rbot/plugins.rb | |
parent | 4fc1ba54e78e689b25633dbb1c76b594c3b8e6e5 (diff) |
+ ctcp_listen plugin delegate
Diffstat (limited to 'lib/rbot/plugins.rb')
-rw-r--r-- | lib/rbot/plugins.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/rbot/plugins.rb b/lib/rbot/plugins.rb index 99ae31b6..061c6a73 100644 --- a/lib/rbot/plugins.rb +++ b/lib/rbot/plugins.rb @@ -1,3 +1,8 @@ +#-- vim:sw=2:et +#++ +# +# :title: rbot plugin management + require 'singleton' module Irc @@ -60,6 +65,13 @@ module Plugins QuitMessage, PartMessage, JoinMessage, NickMessage, etc. + ctcp_listen(UserMessage):: + 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. + privmsg(PrivMessage):: Called for a PRIVMSG if the first word matches one the plugin register()d for. Use m.plugin to get |