[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: nick collide prevention ideas
On Wed, Jul 07, 1999 at 05:40:02PM +0200, Q wrote:
> More something like serverID + userID, where userID is probably
> something based on the fd.
No, fds are reused. UniqueID is = serverID + clientID, where cID is
simple 44-based counter. Why 44? That's how many chars isvalid(), so
uID can be used as a normal nick (compatibility, yes). Given this sID
ranges from "000" to "9~~", which gives 10*44^3 = 851840 servers[1]
and cID ranges from "000000" to "~~~~~~", which gives 44^6 = 7256313856
unique clientIDs on each server. With this amount of cIDs we have, and
assumption, that each second new client connects to server, for clientID
to be reused we would have to wait 230 _years_.
p.
[1] if sIDs were to be assigned manually, syrk thought that for random
sIDs we should give 4-char space for sID and 5-char for cID, which anyway
gives accordingly: 37480960 servers, 164916224 cIDs, 5.2 years.