]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
bans plugin: badword checks on plain message
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Tue, 24 Jun 2008 15:30:04 +0000 (17:30 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Tue, 24 Jun 2008 15:39:40 +0000 (17:39 +0200)
data/rbot/plugins/bans.rb

index 3818ce2216f666193b664dcce7b917d7cd042a39..4e35d99638171cfa6310c07ed32a5c669a0add96 100644 (file)
@@ -143,7 +143,7 @@ class BansPlugin < Plugin
 
     @registry[:badwords].each { |badword|
       next unless ['all', m.target.downcase].include?(badword.channel)
-      next unless badword.regexp.match(m.message)
+      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}"