3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-24 11:42:51 +01:00

protocols: remove direct usage of to_lower() for channels

Not needed as of 32249ace3e (ref #372)
This commit is contained in:
James Lu 2017-08-06 18:05:02 -07:00
parent c9c0e0a85b
commit 07fa53d128
6 changed files with 0 additions and 16 deletions

View File

@ -142,7 +142,6 @@ class ClientbotWrapperProtocol(IRCCommonProtocol):
def join(self, client, channel):
"""STUB: Joins a user to a channel."""
channel = self.to_lower(channel)
# Only joins for the main PyLink client are actually forwarded. Others are ignored.
# Note: we do not automatically add our main client to the channel state, as we

View File

@ -76,7 +76,6 @@ class InspIRCdProtocol(TS6BaseProtocol):
# InspIRCd doesn't distinguish between burst joins and regular joins,
# so what we're actually doing here is sending FJOIN from the server,
# on behalf of the clients that are joining.
channel = self.to_lower(channel)
server = self.get_server(client)
if not self.is_internal_server(server):
@ -102,7 +101,6 @@ class InspIRCdProtocol(TS6BaseProtocol):
sjoin('100', '#test', [('', '100AAABBC'), ('qo', 100AAABBB'), ('h', '100AAADDD')])
sjoin(self.sid, '#test', [('o', self.pseudoclient.uid)])
"""
channel = self.to_lower(channel)
server = server or self.sid
assert users, "sjoin: No users sent?"
log.debug('(%s) sjoin: got %r for users', self.name, users)

View File

@ -371,7 +371,6 @@ class IRCS2SProtocol(IRCCommonProtocol):
(not self.is_internal_server(numeric)):
raise LookupError('No such PyLink client/server exists.')
channel = self.to_lower(channel)
if not reason:
reason = 'No reason given'
@ -394,7 +393,6 @@ class IRCS2SProtocol(IRCCommonProtocol):
def part(self, client, channel, reason=None):
"""Sends a part from a PyLink client."""
channel = self.to_lower(channel)
if not self.is_internal_client(client):
log.error('(%s) Error trying to part %r from %r (no such client exists)', self.name, client, channel)
raise LookupError('No such PyLink client exists.')

View File

@ -149,7 +149,6 @@ class NgIRCdProtocol(IRCS2SProtocol):
self.users[source].away = text
def join(self, client, channel):
channel = self.to_lower(channel)
if not self.is_internal_client(client):
raise LookupError('No such PyLink client exists.')
@ -224,7 +223,6 @@ class NgIRCdProtocol(IRCS2SProtocol):
sjoin('100', '#test', [('', 'user0@0'), ('o', user1@1'), ('v', 'someone@2')])
sjoin(self.sid, '#test', [('o', self.pseudoclient.uid)])
"""
channel = self.to_lower(channel)
server = server or self.sid
if not server:
@ -365,7 +363,6 @@ class NgIRCdProtocol(IRCS2SProtocol):
self.apply_modes(channel, [('+' + status, source)])
except ValueError:
channel = chanpair
channel = self.to_lower(channel)
c = self.channels[channel]

View File

@ -66,7 +66,6 @@ class TS6Protocol(TS6BaseProtocol):
def join(self, client, channel):
"""Joins a PyLink client to a channel."""
channel = self.to_lower(channel)
# JOIN:
# parameters: channelTS, channel, '+' (a plus sign)
if not self.is_internal_client(client):
@ -96,7 +95,6 @@ class TS6Protocol(TS6BaseProtocol):
# their status ('@+', '@', '+' or ''), for example:
# '@+1JJAAAAAB +2JJAAAA4C 1JJAAAADS'. All users must be behind the source server
# so it is not possible to use this message to force users to join a channel.
channel = self.to_lower(channel)
server = server or self.sid
assert users, "sjoin: No users sent?"
log.debug('(%s) sjoin: got %r for users', self.name, users)

View File

@ -103,7 +103,6 @@ class UnrealProtocol(TS6BaseProtocol):
def join(self, client, channel):
"""Joins a PyLink client to a channel."""
channel = self.to_lower(channel)
if not self.is_internal_client(client):
raise LookupError('No such PyLink client exists.')
self._send_with_prefix(client, "JOIN %s" % channel)
@ -122,7 +121,6 @@ class UnrealProtocol(TS6BaseProtocol):
sjoin(self.sid, '#test', [('o', self.pseudoclient.uid)])
"""
# <- :001 SJOIN 1444361345 #test :*@+1JJAAAAAB %2JJAAAA4C 1JJAAAADS
channel = self.to_lower(channel)
server = server or self.sid
assert users, "sjoin: No users sent?"
if not server:
@ -549,11 +547,7 @@ class UnrealProtocol(TS6BaseProtocol):
else:
for channel in args[0].split(','):
# Normalize channel case.
channel = self.to_lower(channel)
c = self.channels[channel]
self.users[numeric].channels.add(channel)
self.channels[channel].users.add(numeric)
# Call hooks manually, because one JOIN command in UnrealIRCd can