mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-23 18:54:05 +01:00
Move knock handling to ts6_common
This adds support for (reasonless) KNOCK on TS6.
This commit is contained in:
parent
2245af1dba
commit
454539185e
@ -672,13 +672,6 @@ class InspIRCdProtocol(TS6BaseProtocol):
|
|||||||
# SVSTOPIC is used by InspIRCd module m_topiclock - its arguments are the same as FTOPIC
|
# SVSTOPIC is used by InspIRCd module m_topiclock - its arguments are the same as FTOPIC
|
||||||
handle_svstopic = handle_ftopic
|
handle_svstopic = handle_ftopic
|
||||||
|
|
||||||
def handle_knock(self, numeric, command, args):
|
|
||||||
"""Handles channel KNOCKs."""
|
|
||||||
# <- :70MAAAAAA ENCAP * KNOCK #blah :abcdefg
|
|
||||||
channel = args[0]
|
|
||||||
text = args[1]
|
|
||||||
return {'channel': channel, 'text': text}
|
|
||||||
|
|
||||||
def handle_opertype(self, target, command, args):
|
def handle_opertype(self, target, command, args):
|
||||||
"""Handles incoming OPERTYPE, which is used to denote an oper up.
|
"""Handles incoming OPERTYPE, which is used to denote an oper up.
|
||||||
|
|
||||||
|
@ -56,7 +56,6 @@ class TS6SIDGenerator():
|
|||||||
self.output[idx] = self.allowedchars[idx][0]
|
self.output[idx] = self.allowedchars[idx][0]
|
||||||
next(self.iters[idx])
|
next(self.iters[idx])
|
||||||
|
|
||||||
|
|
||||||
def increment(self, pos=2):
|
def increment(self, pos=2):
|
||||||
"""
|
"""
|
||||||
Increments the SID generator to the next available SID.
|
Increments the SID generator to the next available SID.
|
||||||
@ -198,6 +197,20 @@ class TS6BaseProtocol(IRCS2SProtocol):
|
|||||||
|
|
||||||
### HANDLERS
|
### HANDLERS
|
||||||
|
|
||||||
|
def handle_knock(self, numeric, command, args):
|
||||||
|
"""Handles channel KNOCKs."""
|
||||||
|
# InspIRCd:
|
||||||
|
# <- :70MAAAAAA ENCAP * KNOCK #blah :abcdefg
|
||||||
|
# Charybdis:
|
||||||
|
# <- :42XAAAAAC KNOCK #endlessvoid
|
||||||
|
# UnrealIRCd propagates knocks as a channel notice to all ops, so this handler is not used there.
|
||||||
|
channel = args[0]
|
||||||
|
try:
|
||||||
|
text = args[1]
|
||||||
|
except IndexError:
|
||||||
|
text = ''
|
||||||
|
return {'channel': channel, 'text': text}
|
||||||
|
|
||||||
def handle_nick(self, numeric, command, args):
|
def handle_nick(self, numeric, command, args):
|
||||||
"""Handles incoming NICK changes."""
|
"""Handles incoming NICK changes."""
|
||||||
# <- :70MAAAAAA NICK GL-devel 1434744242
|
# <- :70MAAAAAA NICK GL-devel 1434744242
|
||||||
|
Loading…
Reference in New Issue
Block a user