mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
parent
6828d032b4
commit
17127dd131
@ -252,10 +252,21 @@ class ClientbotWrapperProtocol(Protocol):
|
|||||||
"""Updates the known ident, host, or realname of a client."""
|
"""Updates the known ident, host, or realname of a client."""
|
||||||
if field == 'IDENT':
|
if field == 'IDENT':
|
||||||
self.irc.users[target].ident = text
|
self.irc.users[target].ident = text
|
||||||
|
if not self.irc.isInternalClient(target):
|
||||||
|
# We're updating the host of an external client in our state, so send the appropriate
|
||||||
|
# hook payloads.
|
||||||
|
self.irc.callHooks([self.irc.sid, 'CHGIDENT',
|
||||||
|
{'target': target, 'newident': text}])
|
||||||
elif field == 'HOST':
|
elif field == 'HOST':
|
||||||
self.irc.users[target].host = text
|
self.irc.users[target].host = text
|
||||||
|
if not self.irc.isInternalClient(target):
|
||||||
|
self.irc.callHooks([self.irc.sid, 'CHGHOST',
|
||||||
|
{'target': target, 'newhost': text}])
|
||||||
elif field in ('REALNAME', 'GECOS'):
|
elif field in ('REALNAME', 'GECOS'):
|
||||||
self.irc.users[target].realname = text
|
self.irc.users[target].realname = text
|
||||||
|
if not self.irc.isInternalClient(target):
|
||||||
|
self.irc.callHooks([self.irc.sid, 'CHGNAME',
|
||||||
|
{'target': target, 'newgecos': text}])
|
||||||
else:
|
else:
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user