3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 04:02:45 +01:00

protocols: Channel.removeuser -> Channel.remove_user

This commit is contained in:
James Lu 2017-06-30 21:40:50 -07:00
parent 7d68c03101
commit b81a03fda9
2 changed files with 4 additions and 4 deletions

View File

@ -259,7 +259,7 @@ class ClientbotWrapperProtocol(IRCCommonProtocol):
def part(self, source, channel, reason=''):
"""STUB: Parts a user from a channel."""
self.channels[channel].removeuser(source)
self.channels[channel].remove_user(source)
self.users[source].channels.discard(channel)
# Only parts for the main PyLink client are actually forwarded. Others are ignored.
@ -818,7 +818,7 @@ class ClientbotWrapperProtocol(IRCCommonProtocol):
del self.kick_queue[channel]
# Statekeeping: remove the target from the channel they were previously in.
self.channels[channel].removeuser(target)
self.channels[channel].remove_user(target)
try:
self.users[target].channels.remove(channel)
except KeyError:
@ -907,7 +907,7 @@ class ClientbotWrapperProtocol(IRCCommonProtocol):
reason = ''
for channel in channels:
self.channels[channel].removeuser(source)
self.channels[channel].remove_user(source)
self.users[source].channels -= set(channels)
self.call_hooks([source, 'PART', {'channels': channels, 'text': reason}])

View File

@ -292,7 +292,7 @@ class IRCS2SProtocol(IRCCommonProtocol):
channels = self.to_lower(args[0]).split(',')
for channel in channels:
self.channels[channel].removeuser(source)
self.channels[channel].remove_user(source)
try:
self.users[source].channels.discard(channel)
except KeyError: