Transmitting variable value from client to server

Discussions about Coding and Scripting
Post Reply
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Transmitting variable value from client to server

Post by Barbie »

A very simple problem where I have a tough time of it with: a client has a value setting in his USER.INI. How can I retrieve that value from server side?
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Transmitting variable value from client to server

Post by sektor2111 »

Are you do asking how to retrieve private data from client's User.ini ? May suggest you to not post these ? If you do posting solution, a later modification will allow retrieving data from other INI too. Why should I do these after all ?
Keep this for yourself.
User avatar
Wormbo
Adept
Posts: 258
Joined: Sat Aug 24, 2013 6:04 pm
Contact:

Re: Transmitting variable value from client to server

Post by Wormbo »

Seriously, client->server communication is covered with replicated functions. Nothing special to "hide" about that. There are no server-side measures to retrieve generic information from any client file, the client always needs to read and transmit on its own.
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Transmitting variable value from client to server

Post by Barbie »

sektor2111 wrote:Are you do asking how to retrieve private data from client's User.ini ?
Replace "private" with "client specific" and then your are right. There is nothing suspicious or secret here - I just want to read a value I've written earlier. And it don't have to be USER.INI necessarily but could be any other storage file, that doesn't matter. Compare it to a cookie as used in web technology.

I succeeded already by reading that value from the USER.INI as client's logs shows, but I still wasn't able to transfer this value to the server.
Wormbo wrote:client->server communication is covered with replicated functions.
Do you know where I can look up a working example? Of course I've read some Wiki articles (more than once) and also had a look at "ScoreRecovery4a" which uses the same mechanism as I need, but as mentioned I did not succeed.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Transmitting variable value from client to server

Post by sektor2111 »

Barbie wrote:There is nothing suspicious or secret here
I see you are still learning things... somehow... What if some people have bound keys for AdminLogin or other commands and by chance they visit some location ? They might use faster login in their servers and those things should not be known or transmitted over Network to other Locations than well known ones. Keys assignment are located inside User.INI. We don't need to restart discussions about Nexgen and similar clones what can do. No problem, do what you want, I'll take care where I'm stepping in future.
Now I know what to do with my User.ini.

Saving score is doable in server using SS mutator by Mr. LoathSome or doing small modifications. Like I said already.
All action is guided by server authoritative, I don't see why this data has to be stored and/or retrieved from client.
User avatar
Wormbo
Adept
Posts: 258
Joined: Sat Aug 24, 2013 6:04 pm
Contact:

Re: Transmitting variable value from client to server

Post by Wormbo »

If you store passwords in your keybond section, you're doing it wrong. You can easily add a layer of security by moving ther login command to a text file and executing that via "exec NameOfFile.txt" - server-side keybond checks would have to analyze that file in addition to the keybinds then.

As for cilent->server replicated function calls: "[un]reliable if (Role < ROLE_Authority) functionname;" in replication block and a standard declaration for a function that you call on the client with the data to send as parameters. Working examples are all over the UT code. For a more elaborate explanation see the replication article in my sig. (Or the German version thereof.)
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Transmitting variable value from client to server

Post by sektor2111 »

Heh, I didn't try this exec yet (thinking that won't always work) but if you recommend this way, then I have to wrap things in that INI, thanks for hint. :agree1:
Post Reply