diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-04-15 02:03:04 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-04-15 02:03:04 +0200 |
commit | 18e86e2130304a8b8537d6984da82e0de2f9c13c (patch) | |
tree | d923ac5339216fa8db91846653cb9b1e012cb33a /lib/rbot | |
parent | 8610e08b1dbaa0738d2d6155260dbfba8d8aa42c (diff) |
irclog: uniformize logging style
Diffstat (limited to 'lib/rbot')
-rw-r--r-- | lib/rbot/core/irclog.rb | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/lib/rbot/core/irclog.rb b/lib/rbot/core/irclog.rb index 64469f78..93e62e3d 100644 --- a/lib/rbot/core/irclog.rb +++ b/lib/rbot/core/irclog.rb @@ -36,17 +36,9 @@ class IrcLogModule < CoreBotModule def sent(m) case m when NoticeMessage - if m.public? - irclog "-=#{m.source}=- #{m.message}", m.target - else - irclog "[-=#{m.source}=-] #{m.message}", m.target - end + irclog "-#{m.source}- #{m.message}", m.target when PrivMessage - if m.public? - irclog "<#{m.source}> #{m.message}", m.target - else - irclog "[msg(#{m.target})] #{m.message}", m.target - end + irclog "<#{m.source}> #{m.message}", m.target when QuitMessage m.was_on.each { |ch| irclog "@ quit (#{m.message})", ch @@ -82,7 +74,7 @@ class IrcLogModule < CoreBotModule if m.public? irclog "* #{m.source} #{m.logmessage}", m.target else - irclog "* [#{m.source}(#{m.sourceaddress})] #{m.logmessage}", m.source + irclog "* #{m.source}(#{m.sourceaddress}) #{m.logmessage}", m.source end when :VERSION irclog "@ #{m.source} asked #{who} about version info", logtarget @@ -99,16 +91,16 @@ class IrcLogModule < CoreBotModule if m.public? irclog "<#{m.source}> #{m.logmessage}", m.target else - irclog "[#{m.source}(#{m.sourceaddress})] #{m.logmessage}", m.source + irclog "<#{m.source}(#{m.sourceaddress})> #{m.logmessage}", m.source end end end def log_notice(m) if m.private? - irclog "-#{m.source}- #{m.message}", m.source + irclog "-#{m.source}(#{m.sourceaddress})- #{m.logmessage}", m.source else - irclog "-#{m.source}- #{m.message}", m.target + irclog "-#{m.source}- #{m.logmessage}", m.target end end @@ -126,12 +118,12 @@ class IrcLogModule < CoreBotModule def log_quit(m) m.was_on.each { |ch| - irclog "@ Quit: #{m.source}: #{m.message}", ch + irclog "@ Quit: #{m.source}: #{m.logmessage}", ch } end def modechange(m) - irclog "@ Mode #{m.message} by #{m.source}", m.target + irclog "@ Mode #{m.logmessage} by #{m.source}", m.target end def log_join(m) @@ -185,7 +177,7 @@ class IrcLogModule < CoreBotModule # end def unknown_message(m) - irclog m.message, ".unknown" + irclog m.logmessage, ".unknown" end end |