From e0ae5e3a02ef7c85e9af8c4f476c72f149ab8b32 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Wed, 7 Jun 2006 14:30:01 +0000 Subject: Fix #65 and #95. Disable topic built-in command since the new topic plugin handles that, and more --- lib/rbot/ircbot.rb | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'lib/rbot') diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index 57ef816a..981a09a9 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -635,8 +635,8 @@ class IrcBot return "say | => say to or in private message to " when "action" return "action | => does a /me to or in private message to " - when "topic" - return "topic => set topic of to " + # when "topic" + # return "topic => set topic of to " when "quiet" return "quiet [in here|] => with no arguments, stop speaking in all channels, if \"in here\", stop speaking in this channel, or stop speaking in " when "talk" @@ -679,6 +679,7 @@ class IrcBot end if(m.address?) + delegate_privmsg(m) case m.message when (/^join\s+(\S+)\s+(\S+)$/i) join $1, $2 if(@auth.allow?("join", m.source, m.replyto)) @@ -705,16 +706,19 @@ class IrcBot say $1, $2 if(@auth.allow?("say", m.source, m.replyto)) when (/^action\s+(\S+)\s+(.*)$/i) action $1, $2 if(@auth.allow?("say", m.source, m.replyto)) - when (/^topic\s+(\S+)\s+(.*)$/i) - topic $1, $2 if(@auth.allow?("topic", m.source, m.replyto)) + # when (/^topic\s+(\S+)\s+(.*)$/i) + # topic $1, $2 if(@auth.allow?("topic", m.source, m.replyto)) when (/^mode\s+(\S+)\s+(\S+)\s+(.*)$/i) mode $1, $2, $3 if(@auth.allow?("mode", m.source, m.replyto)) when (/^ping$/i) say m.replyto, "pong" when (/^rescan$/i) if(@auth.allow?("config", m.source, m.replyto)) - m.okay + m.reply "Saving ..." + save + m.reply "Rescanning ..." rescan + m.okay end when (/^quiet$/i) if(auth.allow?("talk", m.source, m.replyto)) @@ -759,8 +763,6 @@ class IrcBot when (/^(hello|howdy|hola|salut|bonjour|sup|niihau|hey|hi(\W|$)|yo(\W|$)).*/i) say m.replyto, @lang.get("hello_X") % m.sourcenick if(m.public?) say m.replyto, @lang.get("hello") if(m.private?) - else - delegate_privmsg(m) end else # stuff to handle when not addressed -- cgit v1.2.3