3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-27 21:19:31 +01:00

clientbot: generate PUIDs/PSIDs with the nick or server name as prefix

This commit is contained in:
James Lu 2017-04-09 15:32:13 -07:00
parent 0e6d33a668
commit 2feb93aaf0

View File

@ -104,7 +104,7 @@ class ClientbotWrapperProtocol(Protocol):
"""
server = server or self.irc.sid
uid = self.uidgen.next_uid()
uid = self.uidgen.next_uid(prefix=nick)
ts = ts or int(time.time())
@ -122,7 +122,7 @@ class ClientbotWrapperProtocol(Protocol):
STUB: Pretends to spawn a new server with a subset of the given options.
"""
name = name.lower()
sid = self.sidgen.next_sid()
sid = self.sidgen.next_sid(prefix=name)
self.irc.servers[sid] = IrcServer(uplink, name, internal=internal)
return sid