diff options
Diffstat (limited to 'lib/rbot')
-rw-r--r-- | lib/rbot/core/config.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/rbot/core/config.rb b/lib/rbot/core/config.rb index 7ff7a88c..717408a2 100644 --- a/lib/rbot/core/config.rb +++ b/lib/rbot/core/config.rb @@ -178,6 +178,18 @@ class ConfigModule < CoreBotModule m.reply version_string
end
+ def ctcp_listen(m)
+ who = m.private? ? "me" : m.target
+ case m.ctcp.intern
+ when :VERSION
+ m.ctcp_reply version_string
+ @bot.irclog "@ #{m.source} asked #{who} about version info"
+ when :SOURCE
+ m.ctcp_reply Irc::Bot::SOURCE_URL
+ @bot.irclog "@ #{m.source} asked #{who} about source info"
+ end
+ end
+
def handle_help(m, params)
m.reply help(params[:topic])
end
|