Set server name by event["prefix"].hoskmask not .nickname, they're the same

thing at the moment when it's not a `nick!user@host` but eventually it might not
be (line_handler.py)
This commit is contained in:
jesopo 2019-01-26 19:38:14 +00:00
parent 0d7b39e7d9
commit 3b17cbacea

View file

@ -66,7 +66,7 @@ class Module(ModuleManager.BaseModule):
@utils.hook("raw.received.001", default_event=True) @utils.hook("raw.received.001", default_event=True)
def handle_001(self, event): def handle_001(self, event):
event["server"].set_write_throttling(True) event["server"].set_write_throttling(True)
event["server"].name = event["prefix"].nickname event["server"].name = event["prefix"].hostmask
event["server"].set_own_nickname(event["args"][0]) event["server"].set_own_nickname(event["args"][0])
event["server"].send_whois(event["server"].nickname) event["server"].send_whois(event["server"].nickname)