3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 09:19:23 +01:00

protocols: updateClient -> update_client

This commit is contained in:
James Lu 2017-06-30 21:29:38 -07:00
parent f38b9c9a2c
commit 927fa9aac9
7 changed files with 12 additions and 12 deletions

View File

@ -305,10 +305,10 @@ class ClientbotWrapperProtocol(IRCCommonProtocol):
return
kill = topic = topic_burst = knock = numeric = _stub
def updateClient(self, target, field, text):
def update_client(self, target, field, text):
"""Updates the known ident, host, or realname of a client."""
if target not in self.users:
log.warning("(%s) Unknown target %s for updateClient()", self.name, target)
log.warning("(%s) Unknown target %s for update_client()", self.name, target)
return
u = self.users[target]
@ -711,9 +711,9 @@ class ClientbotWrapperProtocol(IRCCommonProtocol):
log.debug("(%s) Ignoring extraneous /WHO info for %s", self.name, nick)
return
self.updateClient(uid, 'IDENT', ident)
self.updateClient(uid, 'HOST', host)
self.updateClient(uid, 'GECOS', realname)
self.update_client(uid, 'IDENT', ident)
self.update_client(uid, 'HOST', host)
self.update_client(uid, 'GECOS', realname)
# The status given uses the following letters: <H|G>[*][@|+]
# H means here (not marked /away)

View File

@ -115,7 +115,7 @@ class HybridProtocol(TS6Protocol):
modes=raw_modes, ip=ip, realname=realname))
return u
def updateClient(self, target, field, text):
def update_client(self, target, field, text):
"""Updates the ident, host, or realname of a PyLink client."""
# https://github.com/ircd-hybrid/ircd-hybrid/blob/58323b8/modules/m_svsmode.c#L40-L103
# parv[0] = command

View File

@ -255,7 +255,7 @@ class InspIRCdProtocol(TS6BaseProtocol):
raise LookupError('No such PyLink client exists.')
self._send_with_prefix(numeric, 'ENCAP * KNOCK %s :%s' % (target, text))
def updateClient(self, target, field, text):
def update_client(self, target, field, text):
"""Updates the ident, host, or realname of any connected client."""
field = field.upper()

View File

@ -705,7 +705,7 @@ class P10Protocol(IRCS2SProtocol):
self.channels[target].topic = text
self.channels[target].topicset = True
def updateClient(self, target, field, text):
def update_client(self, target, field, text):
"""Updates the ident or host of any connected client."""
uobj = self.users[target]

View File

@ -82,8 +82,8 @@ class RatboxProtocol(TS6Protocol):
return u
def updateClient(self, target, field, text):
"""updateClient() stub for ratbox."""
def update_client(self, target, field, text):
"""update_client() stub for ratbox."""
raise NotImplementedError("User data changing is not supported on ircd-ratbox.")
def handle_realhost(self, uid, command, args):

View File

@ -227,7 +227,7 @@ class TS6Protocol(TS6BaseProtocol):
# No text value is supported here; drop it.
self._send_with_prefix(numeric, 'KNOCK %s' % target)
def updateClient(self, target, field, text):
def update_client(self, target, field, text):
"""Updates the hostname of any connected client."""
field = field.upper()
if field == 'HOST':

View File

@ -274,7 +274,7 @@ class UnrealProtocol(TS6BaseProtocol):
self.channels[target].topic = text
self.channels[target].topicset = True
def updateClient(self, target, field, text):
def update_client(self, target, field, text):
"""Updates the ident, host, or realname of any connected client."""
field = field.upper()