mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-12 05:02:33 +01:00
spawnClient: add ts as opt. argument; relay: spawn pseudoclients w/ TS of original user
This commit is contained in:
parent
44e07b0c2f
commit
8799e1ccc8
@ -143,7 +143,7 @@ def getRemoteUser(irc, remoteirc, user, spawnIfMissing=True):
|
||||
modes = getSupportedUmodes(irc, remoteirc, userobj.modes)
|
||||
u = remoteirc.proto.spawnClient(remoteirc, nick, ident=ident,
|
||||
host=host, realname=realname,
|
||||
modes=modes).uid
|
||||
modes=modes, ts=userobj.ts).uid
|
||||
remoteirc.users[u].remote = irc.name
|
||||
relayusers[(irc.name, user)][remoteirc.name] = u
|
||||
remoteirc.users[u].remote = irc.name
|
||||
|
@ -25,7 +25,7 @@ def _send(irc, sid, msg):
|
||||
irc.send(':%s %s' % (sid, msg))
|
||||
|
||||
def spawnClient(irc, nick, ident='null', host='null', realhost=None, modes=set(),
|
||||
server=None, ip='0.0.0.0', realname=None):
|
||||
server=None, ip='0.0.0.0', realname=None, ts=None):
|
||||
server = server or irc.sid
|
||||
if not utils.isInternalServer(irc, server):
|
||||
raise ValueError('Server %r is not a PyLink internal PseudoServer!' % server)
|
||||
@ -34,7 +34,7 @@ def spawnClient(irc, nick, ident='null', host='null', realhost=None, modes=set()
|
||||
if server not in irc.uidgen:
|
||||
irc.uidgen[server] = utils.TS6UIDGenerator(server)
|
||||
uid = irc.uidgen[server].next_uid()
|
||||
ts = int(time.time())
|
||||
ts = ts or int(time.time())
|
||||
realname = realname or irc.botdata['realname']
|
||||
realhost = realhost or host
|
||||
raw_modes = utils.joinModes(modes)
|
||||
|
@ -24,7 +24,7 @@ def _send(irc, sid, msg):
|
||||
irc.send(':%s %s' % (sid, msg))
|
||||
|
||||
def spawnClient(irc, nick, ident='null', host='null', realhost=None, modes=set(),
|
||||
server=None, ip='0.0.0.0', realname=None):
|
||||
server=None, ip='0.0.0.0', realname=None, ts=None):
|
||||
server = server or irc.sid
|
||||
if not utils.isInternalServer(irc, server):
|
||||
raise ValueError('Server %r is not a PyLink internal PseudoServer!' % server)
|
||||
@ -36,7 +36,7 @@ def spawnClient(irc, nick, ident='null', host='null', realhost=None, modes=set()
|
||||
# UID:
|
||||
# parameters: nickname, hopcount, nickTS, umodes, username,
|
||||
# visible hostname, IP address, UID, gecos
|
||||
ts = int(time.time())
|
||||
ts = ts or int(time.time())
|
||||
realname = realname or irc.botdata['realname']
|
||||
realhost = realhost or host
|
||||
raw_modes = utils.joinModes(modes)
|
||||
|
Loading…
Reference in New Issue
Block a user