3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-03 16:39:25 +01:00

protocols: rename 'oldchan' in MODE payloads to 'chandata'

This commit is contained in:
James Lu 2016-08-27 17:46:14 -07:00
parent 87757a60a3
commit 3c7b201f57
6 changed files with 6 additions and 6 deletions

View File

@ -1231,7 +1231,7 @@ def handle_mode(irc, numeric, command, args):
if utils.isChannel(target):
# Use the old state of the channel to check for CLAIM access.
oldchan = args.get('oldchan')
oldchan = args.get('chandata')
if checkClaim(irc, target, numeric, chanobj=oldchan):
remotechan = getRemoteChan(irc, remoteirc, target)

View File

@ -551,7 +551,7 @@ class ClientbotWrapperProtocol(Protocol):
if self.irc.isInternalClient(target):
log.debug('(%s) Suppressing MODE change hook for internal client %s', self.irc.name, target)
return
return {'target': target, 'modes': changedmodes, 'oldchan': oldobj}
return {'target': target, 'modes': changedmodes, 'chandata': oldobj}
def handle_nick(self, source, command, args):
"""Handles NICK changes."""

View File

@ -611,7 +611,7 @@ class InspIRCdProtocol(TS6BaseProtocol):
self.irc.applyModes(channel, changedmodes)
ts = int(args[1])
return {'target': channel, 'modes': changedmodes, 'ts': ts,
'oldchan': oldobj}
'chandata': oldobj}
def handle_mode(self, numeric, command, args):
"""Handles incoming user mode changes."""

View File

@ -1246,7 +1246,7 @@ class P10Protocol(IRCS2SProtocol):
changedmodes.append(('-%s' % modechar, None))
self.irc.applyModes(channel, changedmodes)
return {'target': channel, 'modes': changedmodes, 'oldchan': oldobj}
return {'target': channel, 'modes': changedmodes, 'chandata': oldobj}
def handle_account(self, numeric, command, args):
"""Handles services account changes."""

View File

@ -576,7 +576,7 @@ class TS6Protocol(TS6BaseProtocol):
self.irc.applyModes(channel, changedmodes)
ts = int(args[0])
return {'target': channel, 'modes': changedmodes, 'ts': ts,
'oldchan': oldobj}
'chandata': oldobj}
def handle_mode(self, numeric, command, args):
"""Handles incoming user mode changes."""

View File

@ -660,7 +660,7 @@ class UnrealProtocol(TS6BaseProtocol):
their_ts = int(args[-1])
if their_ts > 0:
self.updateTS(numeric, channel, their_ts)
return {'target': channel, 'modes': parsedmodes, 'oldchan': oldobj}
return {'target': channel, 'modes': parsedmodes, 'chandata': oldobj}
else:
log.warning("(%s) received MODE for non-channel target: %r",
self.irc.name, args)