mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-12 21:22:36 +01:00
protocols: Channel.removeuser -> Channel.remove_user
This commit is contained in:
parent
7d68c03101
commit
b81a03fda9
@ -259,7 +259,7 @@ class ClientbotWrapperProtocol(IRCCommonProtocol):
|
|||||||
|
|
||||||
def part(self, source, channel, reason=''):
|
def part(self, source, channel, reason=''):
|
||||||
"""STUB: Parts a user from a channel."""
|
"""STUB: Parts a user from a channel."""
|
||||||
self.channels[channel].removeuser(source)
|
self.channels[channel].remove_user(source)
|
||||||
self.users[source].channels.discard(channel)
|
self.users[source].channels.discard(channel)
|
||||||
|
|
||||||
# Only parts for the main PyLink client are actually forwarded. Others are ignored.
|
# 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]
|
del self.kick_queue[channel]
|
||||||
|
|
||||||
# Statekeeping: remove the target from the channel they were previously in.
|
# Statekeeping: remove the target from the channel they were previously in.
|
||||||
self.channels[channel].removeuser(target)
|
self.channels[channel].remove_user(target)
|
||||||
try:
|
try:
|
||||||
self.users[target].channels.remove(channel)
|
self.users[target].channels.remove(channel)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
@ -907,7 +907,7 @@ class ClientbotWrapperProtocol(IRCCommonProtocol):
|
|||||||
reason = ''
|
reason = ''
|
||||||
|
|
||||||
for channel in channels:
|
for channel in channels:
|
||||||
self.channels[channel].removeuser(source)
|
self.channels[channel].remove_user(source)
|
||||||
self.users[source].channels -= set(channels)
|
self.users[source].channels -= set(channels)
|
||||||
|
|
||||||
self.call_hooks([source, 'PART', {'channels': channels, 'text': reason}])
|
self.call_hooks([source, 'PART', {'channels': channels, 'text': reason}])
|
||||||
|
@ -292,7 +292,7 @@ class IRCS2SProtocol(IRCCommonProtocol):
|
|||||||
channels = self.to_lower(args[0]).split(',')
|
channels = self.to_lower(args[0]).split(',')
|
||||||
|
|
||||||
for channel in channels:
|
for channel in channels:
|
||||||
self.channels[channel].removeuser(source)
|
self.channels[channel].remove_user(source)
|
||||||
try:
|
try:
|
||||||
self.users[source].channels.discard(channel)
|
self.users[source].channels.discard(channel)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
Loading…
Reference in New Issue
Block a user