+ logtarget = who = m.target
+ if m.ctcp
+ case m.ctcp.intern
+ when :ACTION
+ irclog "* #{m.source} #{m.logmessage}", logtarget
+ when :VERSION
+ irclog "@ #{m.source} asked #{who} about version info", logtarget
+ when :SOURCE
+ irclog "@ #{m.source} asked #{who} about source info", logtarget
+ when :PING
+ irclog "@ #{m.source} pinged #{who}", logtarget
+ when :TIME
+ irclog "@ #{m.source} asked #{who} what time it is", logtarget
+ else
+ irclog "@ #{m.source} asked #{who} about #{[m.ctcp, m.message].join(' ')}", logtarget
+ end
+ else
+ irclog "<#{m.source}> #{m.logmessage}", logtarget
+ end