From f352166d25d77a587827d14d0c1b09c4bb2d9e34 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 19 Jun 2015 13:15:49 -0700 Subject: [PATCH] proto/insp: use the client's TS in WHOIS IDLE replies Use the client's TS, not the global IRC start time. Everything else for client timestamp tracking is basically done, at least for this protocol handler. Closes #11. --- protocols/inspircd.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/protocols/inspircd.py b/protocols/inspircd.py index d517555..62d6dc7 100644 --- a/protocols/inspircd.py +++ b/protocols/inspircd.py @@ -224,8 +224,8 @@ def handle_server(irc, numeric, command, args): irc.servers[sid] = IrcServer(numeric) def handle_nick(irc, numeric, command, args): - newnick = args[0] - irc.users[numeric].nick = newnick + # <- :70MAAAAAA NICK GL-devel 1434744242 + irc.users[numeric].nick = args[0] def handle_save(irc, numeric, command, args): # This is used to handle nick collisions. Here, the client Derp_ already exists, @@ -267,7 +267,7 @@ def handle_idle(irc, numeric, command, args): # -> :1MLAAAAIG IDLE 70MAAAAAA 1433036797 319 sourceuser = numeric targetuser = args[0] - _sendFromUser(irc, targetuser, 'IDLE %s %s 0' % (sourceuser, irc.start_ts)) + _sendFromUser(irc, targetuser, 'IDLE %s %s 0' % (sourceuser, irc.users[targetuser].ts)) def handle_events(irc, data): # Each server message looks something like this: