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
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