Author Topic: Trying to send from the client's IP address with a server.cs file? Any other way  (Read 1644 times)

Well, as you might know I have my rating mod. To prevent rating spam I thought I'd do one rating per IP per game.


BUT, I figured out anything sent from a server with a server.cs will be from the servers IP address. Meaning olny one person in that server can rate it.


So, how can I combine client.cs and server.cs to make a serverCmd command send from the client's IP address?

[At this rate I probally should do away with the server.cs way and just make it client.cs]


You could still just use the server.cs to do this properly.
You could send the user's rating, and the user's ip. The data will be sent from the server's ip, but you could just read the user's rating sent with the data.

client.getRawIP()
That's what you need for getting a client's IP.

Actually, you could use the server's ip to tell what server they voted for, and the client's ip to see who is voting.

Couldn't people still spam by changing the IP though?
They could make their own script and just change that line with lololol555.555
Or anything.



Quote
Actually, you could use the server's ip to tell what server they voted for, and the client's ip to see who is voting.


Exactly, that is what I am doing.

Tom

I would just make it clientside.

Well that's true.
But either way, it will be and can be abused, or only 1 vote will be allowed.
Maybe have it as just a client.cs, and give it to some selected judges?

Either way, it's not going to work well unless it's put into the main Blockland code.

Olny one vote per IP was my origional idea.
(PER GAME)

If I can send it FROM the client's IP, then there would be very little way to exploit/hack it.
« Last Edit: July 12, 2009, 03:08:54 PM by Azjherben »

I'm a little confused, where are the ratings stored? Can't you just make the code completely client side communicating with a web server?

I'm a little confused, where are the ratings stored? Can't you just make the code completely client side communicating with a web server?

If you went to the main topic for this in Mod Discussion and downloaded the file.
FILE LINK:
http://azjherben.org/script_ratings.zip

Then'd you notice it communicated to the Azjherbeniex Hevene.

That means I have to make it a keybinded gui to rate instead of a serverCmd command. That's going to be bothersome.

crap!?

It still sends the server host's IP even though it's a client sided mod!

You're putting "serverCmdrate" in client.cs. It's still a server-side function, but now you've broken it on dedicated servers.

You're putting "serverCmdrate" in client.cs. It's still a server-side function, but now you've broken it on dedicated servers.
So the olny way is to make a keybinded gui?
Correct?

How do I find the client who pushed the button?
I basically need to find the name of the person who pushed a button on the gui.


Also how do I find the name of the host of the game I'm in.... from a client script?
« Last Edit: July 12, 2009, 05:28:16 PM by Azjherben »

I'm not sure if host name is stored on the client, the master server auto gives the hosts name, you could read that file...

The name of the client can be found by, I'm guessing, $client::netName  That's probably wrong but something like that.

I'm not sure if host name is stored on the client, the master server auto gives the hosts name, you could read that file...

The name of the client can be found by, I'm guessing, $client::netName  That's probably wrong but something like that.

So if I had a client.cs file with

$bob = $client::netName;
echo($bob);

Next time I ran BL it'd work?