]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/bans.rb
hangman plugin: rudimentary stats tracking along with some other enhancements
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / bans.rb
index b25cb50b95247e0686c87b4da435ff63fbc1cdb5..52993106f6fb98d8d534a3b3ec6455b43868453e 100644 (file)
@@ -145,8 +145,8 @@ class BansPlugin < Plugin
       next unless ['all', m.target.downcase].include?(badword.channel)
       next unless badword.regexp.match(m.plainmessage)
 
-      do_cmd(badword.action.to_sym, m.source.nick, m.target, badword.timer, badword.reason)
       m.reply "bad word detected! #{badword.action} for #{badword.timer} because: #{badword.reason}"
+      do_cmd(badword.action.to_sym, m.source.nick, m.target, badword.timer, badword.reason)
       return
     }
   end
@@ -298,8 +298,8 @@ class BansPlugin < Plugin
 
       badwords.each { |badword|
         next unless ['all', badword.channel].include?(channel)
-       debug "Removing #{badword.inspect}" if badword == regexp
-        badwords.delete(badword) if badword == regexp
+        debug "Removing #{badword.inspect}" if badword.regexp == regexp
+        badwords.delete(badword) if badword.regexp == regexp
       }
     end