summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/rbot/ircbot.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb
index 65f3edf6..33def8bc 100644
--- a/lib/rbot/ircbot.rb
+++ b/lib/rbot/ircbot.rb
@@ -558,7 +558,7 @@ class Bot
# Array of channels names where the bot should be quiet
# '*' means all channels
#
- @quiet = []
+ @quiet = Set.new
@client[:welcome] = proc {|data|
m = WelcomeMessage.new(self, server, data[:source], data[:target], data[:message])
@@ -753,17 +753,17 @@ class Bot
return @quiet.include?('*') || @quiet.include?(channel.downcase)
end
- def set_quiet(channel)
+ def set_quiet(channel = nil)
if channel
ch = channel.downcase.dup
- @quiet << ch unless @quiet.include?(ch)
+ @quiet << ch
else
@quiet.clear
@quiet << '*'
end
end
- def reset_quiet(channel)
+ def reset_quiet(channel = nil)
if channel
@quiet.delete channel.downcase
else