diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-09-24 18:25:17 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-09-24 18:25:17 +0200 |
commit | 83af4b075104cc6c6f3acf226ff27e2e1c3171aa (patch) | |
tree | 729cb9c838262a0f1bde00d42f561e43ada7d507 | |
parent | 6540f612f912ea89b2b3b2842d8103a49a0c514b (diff) |
IRC logging: only log nick/quits on the channels the bot is in
-rw-r--r-- | lib/rbot/core/irclog.rb | 4 |
1 files 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 |