mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
protocols: catch S2S messages if they're being routed the wrong way (#405)
This commit is contained in:
parent
2f968aca80
commit
f1fddefeac
@ -846,6 +846,10 @@ class P10Protocol(IRCS2SProtocol):
|
|||||||
return
|
return
|
||||||
|
|
||||||
else: # Send a hook with the hook arguments given by the handler function.
|
else: # Send a hook with the hook arguments given by the handler function.
|
||||||
|
if self.irc.isInternalClient(sender) or self.irc.isInternalServer(sender):
|
||||||
|
log.warning("(%s) Received command %s being routed the wrong way!", self.irc.name, command)
|
||||||
|
return
|
||||||
|
|
||||||
parsed_args = func(sender, command, args)
|
parsed_args = func(sender, command, args)
|
||||||
if parsed_args is not None:
|
if parsed_args is not None:
|
||||||
return [sender, command, parsed_args]
|
return [sender, command, parsed_args]
|
||||||
|
@ -330,6 +330,10 @@ class TS6BaseProtocol(IRCS2SProtocol):
|
|||||||
command = args[0]
|
command = args[0]
|
||||||
args = args[1:]
|
args = args[1:]
|
||||||
|
|
||||||
|
if self.irc.isInternalClient(numeric) or self.irc.isInternalServer(numeric):
|
||||||
|
log.warning("(%s) Received command %s being routed the wrong way!", self.irc.name, command)
|
||||||
|
return
|
||||||
|
|
||||||
if command == 'ENCAP':
|
if command == 'ENCAP':
|
||||||
# Special case for encapsulated commands (ENCAP), in forms like this:
|
# Special case for encapsulated commands (ENCAP), in forms like this:
|
||||||
# <- :00A ENCAP * SU 42XAAAAAC :GLolol
|
# <- :00A ENCAP * SU 42XAAAAAC :GLolol
|
||||||
|
Loading…
Reference in New Issue
Block a user