Perform all received* IrcMsg tagging in one spot.

This also fixes a long-standing failing Misc test since it was relying on the
receivedAt tag.

Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
This commit is contained in:
James McCoy 2011-12-05 23:52:38 -05:00
parent a79e9c0cad
commit 4ddfae427f
2 changed files with 1 additions and 2 deletions

View File

@ -210,11 +210,9 @@ def newDriver(irc, moduleName=None):
return driver
def parseMsg(s):
start = time.time()
s = s.strip()
if s:
msg = ircmsgs.IrcMsg(s)
msg.tag('receivedAt', start)
return msg
else:
return None

View File

@ -777,6 +777,7 @@ class Irc(IrcCommandDispatcher):
"""Called by the IrcDriver; feeds a message received."""
msg.tag('receivedBy', self)
msg.tag('receivedOn', self.network)
msg.tag('receivedAt', time.time())
if msg.args and self.isChannel(msg.args[0]):
channel = msg.args[0]
else: