handle RPL_VISIBLEHOST (396) to catch our hostname (maybe username too) changing
This commit is contained in:
parent
c0947b066d
commit
def6eb0ac3
2 changed files with 10 additions and 0 deletions
|
@ -205,6 +205,10 @@ class Module(ModuleManager.BaseModule):
|
|||
@utils.hook("raw.received.chghost")
|
||||
def chghost(self, event):
|
||||
user.chghost(self.events, event)
|
||||
# RPL_VISIBLEHOST, telling us what our hostname (and sometimes username) is
|
||||
@utils.hook("raw.received.396")
|
||||
def handle_396(self, event):
|
||||
core.handle_396(event)
|
||||
|
||||
# IRCv3 SETNAME, to change a user's realname
|
||||
@utils.hook("raw.received.setname")
|
||||
|
|
|
@ -165,3 +165,9 @@ def handle_433(event):
|
|||
_nick_in_use(event["server"])
|
||||
def handle_437(event):
|
||||
_nick_in_use(event["server"])
|
||||
|
||||
def handle_396(event):
|
||||
username, sep, hostname = event["line"][1].rpartition("@")
|
||||
event["server"].hostname = hostname
|
||||
if sep:
|
||||
event["server"].username = username
|
||||
|
|
Loading…
Reference in a new issue