3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-24 03:29:28 +01:00

Move MODE handling back from ts6_common->inspircd, now that ts6.py does different handling

This commit is contained in:
James Lu 2015-09-08 19:50:46 -07:00
parent 3217f726f8
commit 983acd5adc
2 changed files with 11 additions and 12 deletions

View File

@ -471,6 +471,17 @@ class InspIRCdProtocol(TS6BaseProtocol):
ts = int(args[1])
return {'target': channel, 'modes': changedmodes, 'ts': ts}
def handle_mode(self, numeric, command, args):
"""Handles incoming user mode changes."""
# In InspIRCd, MODE is used for setting user modes and
# FMODE is used for channel modes:
# <- :70MAAAAAA MODE 70MAAAAAA -i+xc
target = args[0]
modestrings = args[1:]
changedmodes = utils.parseModes(self.irc, numeric, modestrings)
utils.applyModes(self.irc, target, changedmodes)
return {'target': target, 'modes': changedmodes}
def handle_idle(self, numeric, command, args):
"""Handles the IDLE command, sent between servers in remote WHOIS queries."""
# <- :70MAAAAAA IDLE 1MLAAAAIG

View File

@ -215,18 +215,6 @@ class TS6BaseProtocol(Protocol):
log.debug('(%s) Netsplit affected users: %s', self.irc.name, affected_users)
return {'target': split_server, 'users': affected_users}
def handle_mode(self, numeric, command, args):
"""Handles incoming user mode changes. For channel mode changes,
TMODE (TS6/charybdis) and FMODE (InspIRCd) are used instead."""
# In InspIRCd, MODE is used for setting user modes and
# FMODE is used for channel modes:
# <- :70MAAAAAA MODE 70MAAAAAA -i+xc
target = args[0]
modestrings = args[1:]
changedmodes = utils.parseModes(self.irc, numeric, modestrings)
utils.applyModes(self.irc, target, changedmodes)
return {'target': target, 'modes': changedmodes}
def handle_topic(self, numeric, command, args):
"""Handles incoming TOPIC changes from clients. For topic bursts,
TB (TS6/charybdis) and FTOPIC (InspIRCd) are used instead."""