From: Giuseppe Bilotta Date: Wed, 24 Sep 2008 16:25:17 +0000 (+0200) Subject: IRC logging: only log nick/quits on the channels the bot is in X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=83af4b075104cc6c6f3acf226ff27e2e1c3171aa;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git IRC logging: only log nick/quits on the channels the bot is in --- diff --git a/lib/rbot/core/irclog.rb b/lib/rbot/core/irclog.rb index 5a44995d..c42d7adf 100644 --- a/lib/rbot/core/irclog.rb +++ b/lib/rbot/core/irclog.rb @@ -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