mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-30 14:49:28 +01:00
unreal: add updateClient
This commit is contained in:
parent
e167be2a69
commit
7e8e8f33f7
@ -205,6 +205,22 @@ class UnrealProtocol(TS6BaseProtocol):
|
|||||||
self.irc.channels[target].topic = text
|
self.irc.channels[target].topic = text
|
||||||
self.irc.channels[target].topicset = True
|
self.irc.channels[target].topicset = True
|
||||||
|
|
||||||
|
def updateClient(self, numeric, field, text):
|
||||||
|
"""Updates the ident, host, or realname of a PyLink client."""
|
||||||
|
field = field.upper()
|
||||||
|
if field == 'IDENT':
|
||||||
|
self.irc.users[numeric].ident = text
|
||||||
|
self._send(numeric, 'SETIDENT %s' % text)
|
||||||
|
elif field == 'HOST':
|
||||||
|
self.irc.users[numeric].host = text
|
||||||
|
self._send(numeric, 'SETHOST %s' % text)
|
||||||
|
elif field in ('REALNAME', 'GECOS'):
|
||||||
|
self.irc.users[numeric].realname = text
|
||||||
|
self._send(numeric, 'SETNAME :%s' % text)
|
||||||
|
else:
|
||||||
|
raise NotImplementedError("Changing field %r of a client is unsupported by this protocol." % field)
|
||||||
|
|
||||||
|
|
||||||
### HANDLERS
|
### HANDLERS
|
||||||
|
|
||||||
def connect(self):
|
def connect(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user