summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTom Gilbert <tom@linuxbrit.co.uk>2005-08-12 19:51:53 +0000
committerTom Gilbert <tom@linuxbrit.co.uk>2005-08-12 19:51:53 +0000
commit3196b989866d1f136e9eb16d688bb0680bbfca9b (patch)
tree85a5a0ad3315549fb58ddb6ff30aadb3d1d8b6e5 /lib
parente74384474f445f916e58e7a0b5afe9a519b77f86 (diff)
some tweaks
Diffstat (limited to 'lib')
-rw-r--r--lib/rbot/auth.rb2
-rw-r--r--lib/rbot/messagemapper.rb9
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/rbot/auth.rb b/lib/rbot/auth.rb
index cc11a5a2..16f092a5 100644
--- a/lib/rbot/auth.rb
+++ b/lib/rbot/auth.rb
@@ -6,7 +6,7 @@ module Irc
# match *!*@baz.com, foo!*@*, *!bar@*, etc.
def Irc.netmaskmatch(globmask, netmask)
regmask = globmask.gsub(/\*/, ".*?")
- return true if(netmask =~ /#{regmask}/)
+ return true if(netmask =~ /#{regmask}/i)
return false
end
diff --git a/lib/rbot/messagemapper.rb b/lib/rbot/messagemapper.rb
index b079acd6..ce33c881 100644
--- a/lib/rbot/messagemapper.rb
+++ b/lib/rbot/messagemapper.rb
@@ -121,7 +121,10 @@ module Irc
failures << [tmpl, failure]
else
action = tmpl.options[:action] ? tmpl.options[:action] : tmpl.items[0]
- next unless @parent.respond_to?(action)
+ unless @parent.respond_to?(action)
+ failures << [tmpl, "class does not respond to action #{action}"]
+ next
+ end
auth = tmpl.options[:auth] ? tmpl.options[:auth] : tmpl.items[0]
debug "checking auth for #{auth}"
if m.bot.auth.allow?(auth, m.source, m.replyto)
@@ -135,7 +138,9 @@ module Irc
return false
end
end
- debug failures.inspect
+ failures.each {|f, r|
+ debug "#{f.inspect} => #{r}"
+ }
debug "no handler found, trying fallback"
if @fallback != nil && @parent.respond_to?(@fallback)
if m.bot.auth.allow?(@fallback, m.source, m.replyto)