mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-25 20:22:45 +01:00
ngircd: fix SQUIT user tracking
This commit is contained in:
parent
970b38719d
commit
37f0dcb456
@ -142,8 +142,9 @@ class NgIRCdProtocol(IRCS2SProtocol):
|
|||||||
|
|
||||||
def handle_nick(self, source, command, args):
|
def handle_nick(self, source, command, args):
|
||||||
# <- :ngircd.midnight.local NICK GL 1 ~gl localhost 1 +io :realname
|
# <- :ngircd.midnight.local NICK GL 1 ~gl localhost 1 +io :realname
|
||||||
|
|
||||||
nick = args[0]
|
nick = args[0]
|
||||||
|
assert source in self.servers, "Server %r tried to introduce nick %r but isn't in the servers index?" % (source, nick)
|
||||||
|
|
||||||
ident = args[2]
|
ident = args[2]
|
||||||
host = args[3]
|
host = args[3]
|
||||||
uid = self.uidgen.next_uid(prefix=nick)
|
uid = self.uidgen.next_uid(prefix=nick)
|
||||||
@ -154,6 +155,9 @@ class NgIRCdProtocol(IRCS2SProtocol):
|
|||||||
parsedmodes = self.parse_modes(uid, [args[5]])
|
parsedmodes = self.parse_modes(uid, [args[5]])
|
||||||
self.apply_modes(uid, parsedmodes)
|
self.apply_modes(uid, parsedmodes)
|
||||||
|
|
||||||
|
# Add the nick to the list of users on its server; this is used for SQUIT tracking
|
||||||
|
self.servers[source].users.add(uid)
|
||||||
|
|
||||||
return {'uid': uid, 'ts': ts, 'nick': nick, 'realhost': host, 'host': host, 'ident': ident,
|
return {'uid': uid, 'ts': ts, 'nick': nick, 'realhost': host, 'host': host, 'ident': ident,
|
||||||
'parse_as': 'UID', 'ip': '0.0.0.0'}
|
'parse_as': 'UID', 'ip': '0.0.0.0'}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user