summaryrefslogtreecommitdiff
path: root/lib/rbot/plugins.rb
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-04-10 08:05:01 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-04-10 08:05:01 +0200
commitb4a4ff08bea8292c379dd075a7b57f7339746860 (patch)
treea26aa2e4e6c6d1098304fe0fcd464872b323e8f4 /lib/rbot/plugins.rb
parentf9c485413f781fa04e56ce3eaedcff07adc1a88f (diff)
plugins: reinstate debug lines in privmsg()
Diffstat (limited to 'lib/rbot/plugins.rb')
-rw-r--r--lib/rbot/plugins.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/rbot/plugins.rb b/lib/rbot/plugins.rb
index 1734233b..7cd163f3 100644
--- a/lib/rbot/plugins.rb
+++ b/lib/rbot/plugins.rb
@@ -836,7 +836,7 @@ module Plugins
# see if we have a plugin that wants to handle this message, if so, pass
# it to the plugin and return true, otherwise false
def privmsg(m)
- # debug "Delegating privmsg #{m.message.inspect} from #{m.source} to #{m.replyto} with pluginkey #{m.plugin.inspect}"
+ debug "Delegating privmsg #{m.inspect} with pluginkey #{m.plugin.inspect}"
return unless m.plugin
k = m.plugin.to_sym
if commands.has_key?(k)
@@ -844,30 +844,30 @@ module Plugins
a = commands[k][:auth]
# We check here for things that don't check themselves
# (e.g. mapped things)
- # debug "Checking auth ..."
+ debug "Checking auth ..."
if a.nil? || @bot.auth.allow?(a, m.source, m.replyto)
- # debug "Checking response ..."
+ debug "Checking response ..."
if p.respond_to?("privmsg")
begin
- # debug "#{p.botmodule_class} #{p.name} responds"
+ debug "#{p.botmodule_class} #{p.name} responds"
p.privmsg(m)
rescue Exception => err
raise if err.kind_of?(SystemExit)
error report_error("#{p.botmodule_class} #{p.name} privmsg() failed:", err)
raise if err.kind_of?(BDB::Fatal)
end
- # debug "Successfully delegated #{m.message}"
+ debug "Successfully delegated #{m.inspect}"
return true
else
- # debug "#{p.botmodule_class} #{p.name} is registered, but it doesn't respond to privmsg()"
+ debug "#{p.botmodule_class} #{p.name} is registered, but it doesn't respond to privmsg()"
end
else
- # debug "#{p.botmodule_class} #{p.name} is registered, but #{m.source} isn't allowed to call #{m.plugin.inspect} on #{m.replyto}"
+ debug "#{p.botmodule_class} #{p.name} is registered, but #{m.source} isn't allowed to call #{m.plugin.inspect} on #{m.replyto}"
end
+ else
+ debug "Command #{k} isn't handled"
end
- # debug "Finished delegating privmsg with key #{m.plugin.inspect}" + ( pl.empty? ? "" : " to #{pl.values.first[:botmodule].botmodule_class}s" )
return false
- # debug "Finished delegating privmsg with key #{m.plugin.inspect}"
end
# delegate IRC messages, by delegating 'listen' first, and the actual method