3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 01:09:22 +01:00

unreal: add missing SJOIN->JOIN hook map, and set irc.connected (relay will otherwise break)

This commit is contained in:
James Lu 2015-11-15 21:42:58 -08:00
parent fa9d4ad955
commit 06539fc813
2 changed files with 3 additions and 1 deletions

View File

@ -170,6 +170,7 @@ def getRemoteSid(irc, remoteirc):
it if it doesn't exist."""
# Don't spawn servers too early.
irc.connected.wait(2)
try:
spawnservers = irc.conf['relay']['spawn_servers']
except KeyError:

View File

@ -20,7 +20,7 @@ class UnrealProtocol(TS6BaseProtocol):
self.proto_ver = 3999
self.min_proto_ver = 3999
self.hook_map = {'UMODE2': 'MODE', 'SVSKILL': 'KILL', 'SVSMODE': 'MODE',
'SVS2MODE': 'MODE'}
'SVS2MODE': 'MODE', 'SJOIN': 'JOIN'}
self.uidgen = {}
self.sidgen = utils.TS6SIDGenerator(self.irc)
@ -261,6 +261,7 @@ class UnrealProtocol(TS6BaseProtocol):
f('SERVER %s 1 U%s-h6e-%s :%s' % (host, self.proto_ver, self.irc.sid, sdesc))
f('NETINFO 1 %s %s * 0 0 0 :%s' % (self.irc.start_ts, self.proto_ver, self.irc.serverdata.get("netname", self.irc.name)))
self._send(self.irc.sid, 'EOS')
self.irc.connected.set()
def handle_uid(self, numeric, command, args):
# <- :001 UID GL 0 1441306929 gl localhost 0018S7901 0 +iowx * midnight-1C620195 fwAAAQ== :realname