]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
Revert one of the cleanups from [309] that totally hid the information on the origin...
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 30 Jul 2006 07:56:24 +0000 (07:56 +0000)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 30 Jul 2006 07:56:24 +0000 (07:56 +0000)
lib/rbot/ircbot.rb

index 1f11e85fa7dfb9717cde72f84754f762efeac993..6226e55e821b39cc93d94021dbc01841874d3bb0 100644 (file)
@@ -17,12 +17,15 @@ def rawlog(level, message=nil, who_pos=1)
   call_stack = caller
   if call_stack.length > who_pos
     who = call_stack[who_pos].sub(%r{(?:.+)/([^/]+):(\d+)(:in .*)?}) { "#{$1}:#{$2}#{$3}" }
-    who.gsub!(/./," ")
   else
     who = "(unknown)"
   end
+  # Output each line. To distinguish between separate messages and multi-line
+  # messages originating at the same time, we blank #{who} after the first message
+  # is output.
   message.to_s.each_line { |l|
     $logger.add(level, l.chomp, who)
+    who.gsub!(/./," ")
   }
 end