mirror of
https://github.com/jlu5/PyLink.git
synced 2025-02-25 18:00:39 +01:00
clientbot: implement updateClient for tracking client ident/host
This commit is contained in:
parent
3e8ed35aea
commit
deddbde2b0
@ -176,6 +176,17 @@ class ClientbotWrapperProtocol(Protocol):
|
|||||||
return
|
return
|
||||||
kill = away = mode = topic = topicBurst = knock = updateClient = numeric = _stub
|
kill = away = mode = topic = topicBurst = knock = updateClient = numeric = _stub
|
||||||
|
|
||||||
|
def updateClient(self, target, field, text):
|
||||||
|
"""Updates the known ident, host, or realname of a client."""
|
||||||
|
if field == 'IDENT':
|
||||||
|
self.irc.users[target].ident = text
|
||||||
|
elif field == 'HOST':
|
||||||
|
self.irc.users[target].host = text
|
||||||
|
elif field in ('REALNAME', 'GECOS'):
|
||||||
|
self.irc.users[target].realname = text
|
||||||
|
else:
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
def handle_events(self, data):
|
def handle_events(self, data):
|
||||||
"""Event handler for the RFC1459/2812 (clientbot) protocol."""
|
"""Event handler for the RFC1459/2812 (clientbot) protocol."""
|
||||||
data = data.split(" ")
|
data = data.split(" ")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user