From 83af4b075104cc6c6f3acf226ff27e2e1c3171aa Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Wed, 24 Sep 2008 18:25:17 +0200 Subject: [PATCH] IRC logging: only log nick/quits on the channels the bot is in --- lib/rbot/core/irclog.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.5