diff --git a/protocols/nefarious.py b/protocols/nefarious.py index b4e7e9b..67adcb1 100644 --- a/protocols/nefarious.py +++ b/protocols/nefarious.py @@ -846,6 +846,10 @@ class P10Protocol(IRCS2SProtocol): return 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) if parsed_args is not None: return [sender, command, parsed_args] diff --git a/protocols/ts6_common.py b/protocols/ts6_common.py index de73667..539673f 100644 --- a/protocols/ts6_common.py +++ b/protocols/ts6_common.py @@ -330,6 +330,10 @@ class TS6BaseProtocol(IRCS2SProtocol): command = args[0] 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': # Special case for encapsulated commands (ENCAP), in forms like this: # <- :00A ENCAP * SU 42XAAAAAC :GLolol