mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 09:19:23 +01:00
unreal: don't confuse legacy SERVER introductions from our uplink with protocol negotiation
Reported by Rascle on IRC.
This commit is contained in:
parent
fab404f8d6
commit
efcc30c983
@ -403,7 +403,7 @@ class UnrealProtocol(TS6BaseProtocol):
|
|||||||
introducing legacy (non-SID) servers."""
|
introducing legacy (non-SID) servers."""
|
||||||
# <- SERVER unreal.midnight.vpn 1 :U3999-Fhin6OoEM UnrealIRCd test server
|
# <- SERVER unreal.midnight.vpn 1 :U3999-Fhin6OoEM UnrealIRCd test server
|
||||||
sname = args[0]
|
sname = args[0]
|
||||||
if numeric == self.irc.uplink: # We're doing authentication
|
if numeric == self.irc.uplink and not irc.connected.is_set(): # We're doing authentication
|
||||||
for cap in self._neededCaps:
|
for cap in self._neededCaps:
|
||||||
if cap not in self.caps:
|
if cap not in self.caps:
|
||||||
raise ProtocolError("Not all required capabilities were met "
|
raise ProtocolError("Not all required capabilities were met "
|
||||||
@ -425,6 +425,10 @@ class UnrealProtocol(TS6BaseProtocol):
|
|||||||
raise ProtocolError("Protocol version too old! (needs at least %s "
|
raise ProtocolError("Protocol version too old! (needs at least %s "
|
||||||
"(Unreal 4.0.0-rc1), got %s)" % (self.min_proto_ver, protover))
|
"(Unreal 4.0.0-rc1), got %s)" % (self.min_proto_ver, protover))
|
||||||
self.irc.servers[numeric] = IrcServer(None, sname)
|
self.irc.servers[numeric] = IrcServer(None, sname)
|
||||||
|
|
||||||
|
# Set irc.connected to True, meaning that protocol negotiation passed.
|
||||||
|
log.debug('(%s) self.irc.connected set!', self.irc.name)
|
||||||
|
self.irc.connected.set()
|
||||||
else:
|
else:
|
||||||
# Legacy (non-SID) servers can still be introduced using the SERVER command.
|
# Legacy (non-SID) servers can still be introduced using the SERVER command.
|
||||||
# <- :services.int SERVER a.bc 2 :(H) [GL] a
|
# <- :services.int SERVER a.bc 2 :(H) [GL] a
|
||||||
@ -477,10 +481,6 @@ class UnrealProtocol(TS6BaseProtocol):
|
|||||||
self.irc.cmodes.update({'halfop': 'h', 'admin': 'a', 'owner': 'q',
|
self.irc.cmodes.update({'halfop': 'h', 'admin': 'a', 'owner': 'q',
|
||||||
'op': 'o', 'voice': 'v'})
|
'op': 'o', 'voice': 'v'})
|
||||||
|
|
||||||
# Set irc.connected to True, meaning that protocol negotiation passed.
|
|
||||||
log.debug('(%s) self.irc.connected set!', self.irc.name)
|
|
||||||
self.irc.connected.set()
|
|
||||||
|
|
||||||
def handle_privmsg(self, source, command, args):
|
def handle_privmsg(self, source, command, args):
|
||||||
# Convert nicks to UIDs, where they exist.
|
# Convert nicks to UIDs, where they exist.
|
||||||
target = self._getNick(args[0])
|
target = self._getNick(args[0])
|
||||||
|
Loading…
Reference in New Issue
Block a user