How IRC protocol gives a unique ID for every client ? reddit / irc ---------------------------------------------------------------------- htepO · 2021-04-11 06:06 The IRC protocol does that? Hm, that's news to me. ---------------------------------------------------------------------- ProgVal · 2021-04-11 06:12 Visibly, there are no IDs, you are only identified by your nick, which also means two people on the same network can't have the same name. However, most federated implementations internally assign IDs so their servers can keep some sort of ID to avoid conflicts between servers (eg. if two users with the same nick connect at the same time); but each implementations does its own thing here; and it's really just an uninteresting detail and not part of the protocol. ---------------------------------------------------------------------- OMGItsCheezWTF · 2021-04-11 12:29 It doesn't, your full identifier on the server is nick!ident@hostname (or IP address if rDNS fails or is disabled) But nicknames must be unique, your nickname is unique to you. If you try and connect and specify a nick that is already in use you'll recieve a numeric 433 response from the server. This is across the whole network, too. So if two servers delink (a net split) and users with the same nick connect to both servers, when they re-establish the link the user with the newest connection will be killed with a nick collision message. ---------------------------------------------------------------------- I-am-fun-at-parties · 2021-04-11 14:51 This guy RFC1459s ---------------------------------------------------------------------- figboot_dev · 2021-04-11 16:10 > the user with the newest connection will be killed with a nick collision message. in 200x, maybe. In modern day, just about every network uses the SAVE protocol. ---------------------------------------------------------------------- OMGItsCheezWTF · 2021-04-11 16:31 Timestamping was the defacto standard when I last ran an IRCd but you're right that was circa 2003-5. Do you have any information on the SAVE protocol? Google is coming up empty because save is a really common word and nothing I'm seeing about nick collision mentions it. ---------------------------------------------------------------------- figboot_dev · 2021-04-11 16:38 Basically, servers come up with a 6-character UID for each local user. Each server has a 3 character SID. In server to server communications, the servers refer to users as their full UIDs (SID + UID), which is 9 characters long. When there is a nick collision, one or both users are SAVEd (using the SAVE command), meaning that their nick is changed to their full UID. SIDs must start with a number, then can be followed by 2 numbers or letters (e.g. 6BN, 3WD, etc.) This way, if the server prohibits users from changing their nick to a nick starting with a number, it is always safe to set a user's nick to their UID. Edit: UIDs are usually sequential, so the first user would be AAAAAA, and the second one would be AAAAAB, and so on. ---------------------------------------------------------------------- KindOne · 2021-04-11 18:50 TS6 protocol, ircd-ratbox (EFnet), charybdis, ircd-seven (freenode), and other forks.. https://github.com/freenode/ircd- seven/blob/master/doc/technical/ts6-protocol.txt CTRL+F SAVE ---------------------------------------------------------------------- ellenor2000 · 2021-04-29 02:53 Some networks don't give you a unique ID, instead relying on your nickname. Nowadays, however, most do give you a unique ID, so that you don't get removed from the network if you happened to collide your nickname during a network split.