]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
IRC logging: only log nick/quits on the channels the bot is in
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 24 Sep 2008 16:25:17 +0000 (18:25 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 24 Sep 2008 16:25:17 +0000 (18:25 +0200)
lib/rbot/core/irclog.rb

index 5a44995de29bcd9758cbd276f23a72a72f9260ec..c42d7adfc6f50f3ae6460fa4e81b0bc59e078439 100644 (file)
@@ -167,13 +167,13 @@ class IrcLogModule < CoreBotModule
   end
 
   def log_nick(m)
-    m.is_on.each { |ch|
+    (m.is_on & @bot.myself.channels).each { |ch|
       irclog "@ #{m.oldnick} is now known as #{m.newnick}", ch
     }
   end
 
   def log_quit(m)
-    m.was_on.each { |ch|
+    (m.was_on & @bot.myself.channels).each { |ch|
       irclog "@ Quit: #{m.source}: #{m.logmessage}", ch
     }
   end