Add an ignore list.

This commit is contained in:
Robert Gerus 2014-03-25 17:55:43 +01:00
parent 95f2767749
commit 1ac5354843

View file

@ -3,6 +3,7 @@ class Repost < EventMachine::IRC::Client
attr_accessor :triggers attr_accessor :triggers
def dispatch_raw_message(message = {}) def dispatch_raw_message(message = {})
return if Config[:ignore].includes?(message[:prefix])
self.triggers.each do |trigger| self.triggers.each do |trigger|
# Having per-command lists of blocks of code to call would be # Having per-command lists of blocks of code to call would be
# faster, but it's not a problem for now. Might refactor this loop # faster, but it's not a problem for now. Might refactor this loop