mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
protocols: rename 'oldchan' in MODE payloads to 'chandata'
This commit is contained in:
parent
87757a60a3
commit
3c7b201f57
@ -1231,7 +1231,7 @@ def handle_mode(irc, numeric, command, args):
|
|||||||
|
|
||||||
if utils.isChannel(target):
|
if utils.isChannel(target):
|
||||||
# Use the old state of the channel to check for CLAIM access.
|
# 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):
|
if checkClaim(irc, target, numeric, chanobj=oldchan):
|
||||||
remotechan = getRemoteChan(irc, remoteirc, target)
|
remotechan = getRemoteChan(irc, remoteirc, target)
|
||||||
|
@ -551,7 +551,7 @@ class ClientbotWrapperProtocol(Protocol):
|
|||||||
if self.irc.isInternalClient(target):
|
if self.irc.isInternalClient(target):
|
||||||
log.debug('(%s) Suppressing MODE change hook for internal client %s', self.irc.name, target)
|
log.debug('(%s) Suppressing MODE change hook for internal client %s', self.irc.name, target)
|
||||||
return
|
return
|
||||||
return {'target': target, 'modes': changedmodes, 'oldchan': oldobj}
|
return {'target': target, 'modes': changedmodes, 'chandata': oldobj}
|
||||||
|
|
||||||
def handle_nick(self, source, command, args):
|
def handle_nick(self, source, command, args):
|
||||||
"""Handles NICK changes."""
|
"""Handles NICK changes."""
|
||||||
|
@ -611,7 +611,7 @@ class InspIRCdProtocol(TS6BaseProtocol):
|
|||||||
self.irc.applyModes(channel, changedmodes)
|
self.irc.applyModes(channel, changedmodes)
|
||||||
ts = int(args[1])
|
ts = int(args[1])
|
||||||
return {'target': channel, 'modes': changedmodes, 'ts': ts,
|
return {'target': channel, 'modes': changedmodes, 'ts': ts,
|
||||||
'oldchan': oldobj}
|
'chandata': oldobj}
|
||||||
|
|
||||||
def handle_mode(self, numeric, command, args):
|
def handle_mode(self, numeric, command, args):
|
||||||
"""Handles incoming user mode changes."""
|
"""Handles incoming user mode changes."""
|
||||||
|
@ -1246,7 +1246,7 @@ class P10Protocol(IRCS2SProtocol):
|
|||||||
changedmodes.append(('-%s' % modechar, None))
|
changedmodes.append(('-%s' % modechar, None))
|
||||||
|
|
||||||
self.irc.applyModes(channel, changedmodes)
|
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):
|
def handle_account(self, numeric, command, args):
|
||||||
"""Handles services account changes."""
|
"""Handles services account changes."""
|
||||||
|
@ -576,7 +576,7 @@ class TS6Protocol(TS6BaseProtocol):
|
|||||||
self.irc.applyModes(channel, changedmodes)
|
self.irc.applyModes(channel, changedmodes)
|
||||||
ts = int(args[0])
|
ts = int(args[0])
|
||||||
return {'target': channel, 'modes': changedmodes, 'ts': ts,
|
return {'target': channel, 'modes': changedmodes, 'ts': ts,
|
||||||
'oldchan': oldobj}
|
'chandata': oldobj}
|
||||||
|
|
||||||
def handle_mode(self, numeric, command, args):
|
def handle_mode(self, numeric, command, args):
|
||||||
"""Handles incoming user mode changes."""
|
"""Handles incoming user mode changes."""
|
||||||
|
@ -660,7 +660,7 @@ class UnrealProtocol(TS6BaseProtocol):
|
|||||||
their_ts = int(args[-1])
|
their_ts = int(args[-1])
|
||||||
if their_ts > 0:
|
if their_ts > 0:
|
||||||
self.updateTS(numeric, channel, their_ts)
|
self.updateTS(numeric, channel, their_ts)
|
||||||
return {'target': channel, 'modes': parsedmodes, 'oldchan': oldobj}
|
return {'target': channel, 'modes': parsedmodes, 'chandata': oldobj}
|
||||||
else:
|
else:
|
||||||
log.warning("(%s) received MODE for non-channel target: %r",
|
log.warning("(%s) received MODE for non-channel target: %r",
|
||||||
self.irc.name, args)
|
self.irc.name, args)
|
||||||
|
Loading…
Reference in New Issue
Block a user