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

NetworkCore: rename removeClient -> _remove_client (no migration stub)

This commit is contained in:
James Lu 2017-06-27 16:21:30 -07:00
parent 5e7529dae4
commit 56275c5a3b
6 changed files with 12 additions and 12 deletions

View File

@ -403,7 +403,7 @@ class PyLinkNetworkCore(utils.DeprecatedAttributesObject, utils.CamelCaseToSnake
"""
return capab.lower() in self.protocol_caps
def remove_client(self, numeric):
def _remove_client(self, numeric):
"""Internal function to remove a client from our internal state."""
for c, v in self.channels.copy().items():
v.removeuser(numeric)

View File

@ -271,7 +271,7 @@ class ClientbotWrapperProtocol(IRCCommonProtocol):
def quit(self, source, reason):
"""STUB: Quits a client."""
userdata = self.users[source]
self.removeClient(source)
self._remove_client(source)
self.callHooks([source, 'CLIENTBOT_QUIT', {'text': reason, 'userdata': userdata}])
def sjoin(self, server, channel, users, ts=None, modes=set()):

View File

@ -227,11 +227,11 @@ class InspIRCdProtocol(TS6BaseProtocol):
self._send_with_prefix(numeric, 'KILL %s :Killed (%s (%s))' % (target, sourcenick, reason))
# We only need to call removeClient here if the target is one of our
# We only need to call _remove_client here if the target is one of our
# clients, since any remote servers will send a QUIT from
# their target if the command succeeds.
if self.isInternalClient(target):
self.removeClient(target)
self._remove_client(target)
def topicBurst(self, numeric, target, text):
"""Sends a topic change from a PyLink server. This is usually used on burst."""
@ -799,7 +799,7 @@ class InspIRCdProtocol(TS6BaseProtocol):
# ourselves.
data = self.users.get(killed)
if data:
self.removeClient(killed)
self._remove_client(killed)
return {'target': killed, 'text': args[1], 'userdata': data}
def handle_sakick(self, source, command, args):

View File

@ -92,7 +92,7 @@ class IRCCommonProtocol(IRCNetwork):
affected_nicks[name].append(nick)
log.debug('Removing client %s (%s)', user, nick)
self.removeClient(user)
self._remove_client(user)
serverdata = self.servers[split_server]
sname = serverdata.name
@ -261,7 +261,7 @@ class IRCS2SProtocol(IRCCommonProtocol):
# ourselves.
data = self.users.get(killed)
if data:
self.removeClient(killed)
self._remove_client(killed)
# TS6-style kills look something like this:
# <- :GL KILL 38QAAAAAA :hidden-1C620195!GL (test)
@ -324,7 +324,7 @@ class IRCS2SProtocol(IRCCommonProtocol):
# <- :1SRAAGB4T QUIT :Quit: quit message goes here
# P10:
# <- ABAAB Q :Killed (GL_ (bangbang))
self.removeClient(numeric)
self._remove_client(numeric)
return {'text': args[0]}
def handle_time(self, numeric, command, args):

View File

@ -374,7 +374,7 @@ class P10Protocol(IRCS2SProtocol):
raise LookupError('No such PyLink client/server exists.')
self._send_with_prefix(numeric, 'D %s :Killed (%s)' % (target, reason))
self.removeClient(target)
self._remove_client(target)
def knock(self, numeric, target, text):
raise NotImplementedError('KNOCK is not supported on P10.')
@ -487,7 +487,7 @@ class P10Protocol(IRCS2SProtocol):
"""Quits a PyLink client."""
if self.isInternalClient(numeric):
self._send_with_prefix(numeric, "Q :%s" % reason)
self.removeClient(numeric)
self._remove_client(numeric)
else:
raise LookupError("No such PyLink client exists.")

View File

@ -183,7 +183,7 @@ class TS6BaseProtocol(IRCS2SProtocol):
killpath = self.servers[self.sid].name
self._send_with_prefix(numeric, 'KILL %s :%s (%s)' % (target, killpath, reason))
self.removeClient(target)
self._remove_client(target)
def nick(self, numeric, newnick):
"""Changes the nick of a PyLink client."""
@ -213,7 +213,7 @@ class TS6BaseProtocol(IRCS2SProtocol):
"""Quits a PyLink client."""
if self.isInternalClient(numeric):
self._send_with_prefix(numeric, "QUIT :%s" % reason)
self.removeClient(numeric)
self._remove_client(numeric)
else:
raise LookupError("No such PyLink client exists.")