2019-05-29 14:52:21 +00:00
|
|
|
from src import ModuleManager, utils
|
|
|
|
|
|
|
|
CAP = utils.irc.Capability("server-time")
|
|
|
|
TAG = utils.irc.MessageTag("time")
|
|
|
|
|
2019-06-20 15:52:23 +00:00
|
|
|
@utils.export("cap", CAP)
|
2019-05-29 14:52:21 +00:00
|
|
|
class Module(ModuleManager.BaseModule):
|
|
|
|
@utils.hook("raw.received")
|
|
|
|
def raw_recv(self, event):
|
|
|
|
server_time = TAG.get_value(event["line"].tags)
|
|
|
|
if not server_time == None:
|
|
|
|
event["server"].set_setting("last-server-time", server_time)
|