Author Topic: Get IP of other clients in server?  (Read 2811 times)

In that case he could just add it to the server-sided part as most servers should have support_updater anyways. There'd be no need for a client sided method.
Pretty much yeah, and in addition you can't get the IP of other players client-sidedly as far as I know. There might be some hacky way to do it. Unless they auth fail in which case their IP is shown to everyone. But then they've auth failed and you shouldn't use it. Catch 22 :P

Yep, I already have server-sided collection, but client-side would be great. Oh well, thanks everybody!

Yep, I already have server-sided collection, but client-side would be great. Oh well, thanks everybody!
You could alternatively store the IP along in the database and have clients send the ID and Name, fetch the old IP from the database and see it that works when authenticating, if so update the database.
That way it'll work for users who have kept the same IP.

An example of that situation.
User A is hosting a server with Updater, User B joins under the name of "BlocklandX", the IP and Name is sent to the Updater server like normal.
User B then leaves to join a server User C is hosting without Updater.
User D which is in User C's server has Updater, sends the ID and Name of User B under the name of "OtherName" to the Updater server.
The server then sees that it has logged the ID, and fetches the IP tied with it and updates the name if it indeed auths.

That would require that name and ID already being logged, which defeats the purpose of wanting to log it

That would require that name and ID already being logged, which defeats the purpose of wanting to log it
But name updates, sure it requires it to be logged once but it would help with future updates.

You'd still need to have logged that ID playing on that name at least once
And what happens when that name has been used by more than one ID?

You'd still need to have logged that ID playing on that name at least once
And what happens when that name has been used by more than one ID?
As I said, you'd fetch the IP by the ID of the user you're sending to update.
The client will send the server the Name and ID, in which the server sees if it has an IP tied to that ID.
If so, it'll send to the blockland authentication servers the IP and name to see if it is correct and update that ID with the new name.
It'll help with updating the names of the IDs the database has already obtained.