Player names / edit / restore

Discussions about Coding and Scripting
User avatar
Sp0ngeb0b
Adept
Posts: 370
Joined: Wed Feb 13, 2008 9:16 pm
Location: Cologne

Re: Player names / edit / restore

Post by Sp0ngeb0b » Thu Jul 09, 2020 2:33 pm

I discourage changing the user name client side. You have no guarantee that you will be able to change it back (i.e. if the client crashes).
Website, Forum & UTStats

Image
******************************************************************************
Nexgen Server Controller || My plugins & mods on GitHub
******************************************************************************

Buggie
Adept
Posts: 421
Joined: Sat Mar 21, 2020 5:32 am

Re: Player names / edit / restore

Post by Buggie » Thu Jul 09, 2020 4:11 pm

His server, his rules. So enjoy ride in car with square wheels if you are so brave that you enter to his server. :lol2:

User avatar
Fraxter
Novice
Posts: 18
Joined: Wed Jul 01, 2020 5:44 pm
Location: Hvalsoe, Zealand, Denmark.

Re: Player names / edit / restore

Post by Fraxter » Thu Jul 09, 2020 7:04 pm

Barbie wrote:
Thu Jul 09, 2020 12:50 pm
I think the function "Logout()" in GameInfo is the best place to implement that. If you use NexGen, there should also be a similar function.
I tried that but it seems the player already left the server when this function is called so the changes wont be saved to user.ini. Good find though!

We will not use NexGen.

User avatar
Fraxter
Novice
Posts: 18
Joined: Wed Jul 01, 2020 5:44 pm
Location: Hvalsoe, Zealand, Denmark.

Re: Player names / edit / restore

Post by Fraxter » Thu Jul 09, 2020 7:08 pm

Buggie wrote:
Thu Jul 09, 2020 4:11 pm
His server, his rules. So enjoy ride in car with square wheels if you are so brave that you enter to his server. :lol2:
I find that comment offending we do not want to make any changes that cause bad actions to players that is why I asked if anyone knew a solution. If you want to critic servers you should critic those who change your favorite servers and assign keybinds and logs all your keybind settings those are bad servers run by bad people.

We will NOT make changes to players ini files, if we can not find solution we will make the players not able to play the server to avoid this. I hope we are clear on that?

User avatar
Fraxter
Novice
Posts: 18
Joined: Wed Jul 01, 2020 5:44 pm
Location: Hvalsoe, Zealand, Denmark.

Re: Player names / edit / restore

Post by Fraxter » Thu Jul 09, 2020 7:10 pm

Sp0ngeb0b wrote:
Thu Jul 09, 2020 2:33 pm
I discourage changing the user name client side. You have no guarantee that you will be able to change it back (i.e. if the client crashes).
We agree and will not do that it is just a misunderstanding.

Buggie
Adept
Posts: 421
Joined: Sat Mar 21, 2020 5:32 am

Re: Player names / edit / restore

Post by Buggie » Thu Jul 09, 2020 9:32 pm

"I’m killing people. But I’m not a bad person. Because I kill them quickly. Those are the people who torture them or kill them slowly, these are the bad people. I’m not like that. I'm good."
Did you mean that? :lol2:

Regarding your question - you cannot change the player’s name and return it back.
This is not possible in principle. Just because you cannot control the shutdown.

However, you can give the changed name in PRI. Most likely it will work as you need.

Take a look at PlayerName in PlayerReplicationInfo.

This will only affect what nickname the players see, but will not affect anyone’s settings.

User avatar
Fraxter
Novice
Posts: 18
Joined: Wed Jul 01, 2020 5:44 pm
Location: Hvalsoe, Zealand, Denmark.

Re: Player names / edit / restore

Post by Fraxter » Fri Jul 10, 2020 7:47 am

Buggie wrote:
Thu Jul 09, 2020 9:32 pm
"I’m killing people. But I’m not a bad person. Because I kill them quickly. Those are the people who torture them or kill them slowly, these are the bad people. I’m not like that. I'm good."
Did you mean that?
No, I did not mean that because that was not what I wrote? You must think I am stupid? Stupid is what stupid does. Dane was right this is not a place to ask for help this is just place of mouth fights and off topic meaningless debate. Have a good day.

User avatar
Feralidragon
Godlike
Posts: 5300
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: Player names / edit / restore

Post by Feralidragon » Fri Jul 10, 2020 3:55 pm

Before generalizing your view onto the entire forum over a couple of posts, maybe you should consider that people have been trying to help you (myself included) in good faith and with the best of intentions, and more importantly, that this is not UT99 customer support, so all the time we spend think up and posting advice and possible solutions comes from our own free time, time we won't get back, especially when is spit onto like that.

Furthermore, maybe you should also think twice before relying on someone else's word, especially Dane's word about anything that goes on in this forum or anywhere else.
Obviously I am not going to dig up the past, no matter how bad it is, but relying in his word alone and treating the folks here trying to help you like that is actually a very stupid thing to do, and in your words, stupid is what stupid does.

Therefore, if you think Dane's help is all you need, then by all means go ahead and make him the sole person helping you, don't bother us if that's how you're going to treat the folks that have been honestly trying to help you for most of the topic.

I gave up in trying to help you the moment you brushed off some good advice completely, especially in the way you did it, so I wasn't going to reply anymore, but I had to after that generalization.
Maybe that makes me a bit immature as well, but oh well, choosing beggars grind my gears, can't help it.

User avatar
sektor2111
Godlike
Posts: 5209
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Player names / edit / restore

Post by sektor2111 » Fri Jul 10, 2020 9:53 pm

A few of my thoughts.
Usually I did not have plans to screw player's name and so his User.ini file. Instead I was discouraging them at using malformed chars from any kind, those are simply stupid childish such ID-s. Player is getting dropped out with message about his name as not being accepted or containing an offending name. Some of them were trying other things and then I had to enhance a bit restrictions. I don't do anything in their install just drop "cute dudes" out of server.
Thing in cause is XC_Engine dependent because in that time it was the only thing capable to work with dynamic arrays read from an INI file - I don't know if UT469 has UScript support here. I could set some code that can be compiled in plain UT but it's a crusher when runs, because UT can read well dynamic arrays only at C++ level in natives.
Why dynamic arrays ? Because these "players" are creative and/or getting normal and then array can be adjusted + -. A fixed array was not what I wanted.

If you are an XC_Engine user/admin I can show you my toy - it's ServerActor. You can adjust that thing as you want. Out of XC_Engine I don't have anything for such restrictions, but maybe you want to turn it into a static thing.