mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-25 04:02:45 +01:00
Move MODE handling back from ts6_common->inspircd, now that ts6.py does different handling
This commit is contained in:
parent
3217f726f8
commit
983acd5adc
@ -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
|
||||
|
@ -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."""
|
||||
|
Loading…
Reference in New Issue
Block a user