From e9088792af23df67c5502131978cda65d51713b9 Mon Sep 17 00:00:00 2001 From: James Lu Date: Wed, 17 Aug 2016 21:19:13 -0700 Subject: [PATCH] unreal: support TSCTL alltime Closes #228. --- protocols/unreal.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/protocols/unreal.py b/protocols/unreal.py index a619f8b..2a7f349 100644 --- a/protocols/unreal.py +++ b/protocols/unreal.py @@ -886,4 +886,12 @@ class UnrealProtocol(TS6BaseProtocol): return super().handle_kill(numeric, command, new_args) + def handle_tsctl(self, source, command, args): + """Handles /TSCTL alltime requests.""" + # <- :GL TSCTL alltime + + if args[0] == 'alltime': + # XXX: We override notice() here because that abstraction doesn't allow messages from servers. + self._send(self.irc.sid, 'NOTICE %s :*** Server=%s time()=%d' % (source, self.irc.hostname(), time.time())) + Class = UnrealProtocol