mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-12 05:02:33 +01:00
IRCS2SProtocol: fix UnboundLocalError in "message coming from wrong way" warning
This fixes a regression from 69cf21c04e
.
This commit is contained in:
parent
990a928602
commit
d2d176b6f9
@ -48,10 +48,6 @@ class IRCS2SProtocol(Protocol):
|
||||
sender = self.irc.uplink
|
||||
args.insert(0, sender)
|
||||
|
||||
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
|
||||
|
||||
raw_command = args[1].upper()
|
||||
args = args[2:]
|
||||
|
||||
@ -62,6 +58,10 @@ class IRCS2SProtocol(Protocol):
|
||||
if command != raw_command:
|
||||
log.debug('(%s) Translating token %s to command %s', self.irc.name, raw_command, command)
|
||||
|
||||
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
|
||||
|
||||
if command == 'ENCAP':
|
||||
# Special case for TS6 encapsulated commands (ENCAP), in forms like this:
|
||||
# <- :00A ENCAP * SU 42XAAAAAC :GLolol
|
||||
|
Loading…
Reference in New Issue
Block a user