mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
inspircd: implement /ALLTIME support (#228)
This commit is contained in:
parent
94aee8f05c
commit
c20dd07a2d
@ -811,4 +811,13 @@ class InspIRCdProtocol(TS6BaseProtocol):
|
|||||||
self.kick(server, channel, target, reason)
|
self.kick(server, channel, target, reason)
|
||||||
return {'channel': channel, 'target': target, 'text': reason}
|
return {'channel': channel, 'target': target, 'text': reason}
|
||||||
|
|
||||||
|
def handle_alltime(self, source, command, args):
|
||||||
|
"""Handles /ALLTIME requests."""
|
||||||
|
# -> :9PYAAAAAA ENCAP * ALLTIME
|
||||||
|
# <- :70M PUSH 0ALAAAAAC ::midnight.vpn NOTICE PyLink-devel :System time is 2016-08-13 02:23:06 (1471054986) on midnight.vpn
|
||||||
|
|
||||||
|
# XXX: We override notice() here because that abstraction doesn't allow messages from servers.
|
||||||
|
timestring = '%s (%s)' % (time.strftime('%Y-%m-%d %H:%M:%S'), int(time.time()))
|
||||||
|
self._send(self.irc.sid, 'NOTICE %s :System time is %s on %s' % (source, timestring, self.irc.hostname()))
|
||||||
|
|
||||||
Class = InspIRCdProtocol
|
Class = InspIRCdProtocol
|
||||||
|
Loading…
Reference in New Issue
Block a user