mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-01 15:52:36 +01:00
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>
(cherry picked from commit 4ddfae427f
)
Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
This commit is contained in:
parent
c606ba6d80
commit
be9415912c
@ -210,11 +210,9 @@ def newDriver(irc, moduleName=None):
|
|||||||
return driver
|
return driver
|
||||||
|
|
||||||
def parseMsg(s):
|
def parseMsg(s):
|
||||||
start = time.time()
|
|
||||||
s = s.strip()
|
s = s.strip()
|
||||||
if s:
|
if s:
|
||||||
msg = ircmsgs.IrcMsg(s)
|
msg = ircmsgs.IrcMsg(s)
|
||||||
msg.tag('receivedAt', start)
|
|
||||||
return msg
|
return msg
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
@ -778,6 +778,7 @@ class Irc(IrcCommandDispatcher):
|
|||||||
"""Called by the IrcDriver; feeds a message received."""
|
"""Called by the IrcDriver; feeds a message received."""
|
||||||
msg.tag('receivedBy', self)
|
msg.tag('receivedBy', self)
|
||||||
msg.tag('receivedOn', self.network)
|
msg.tag('receivedOn', self.network)
|
||||||
|
msg.tag('receivedAt', time.time())
|
||||||
if msg.args and self.isChannel(msg.args[0]):
|
if msg.args and self.isChannel(msg.args[0]):
|
||||||
channel = msg.args[0]
|
channel = msg.args[0]
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user