Raised This Month: $12 Target: $400
 3% 

1.6 MOTD (links)


Post New Thread Reply   
 
Thread Tools Display Modes
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 05-15-2011 , 13:13   Re: 1.6 MOTD (links)
Reply With Quote #21

Quote:
Originally Posted by ARES[ro] View Post
You pointed out exactly what im talking about... HLSW is using some kind of algorithm/header/protocol and no router access is required to manually port forward (unlike other programs like HLDS, wc3 private servers, shoutcast radio server). I would like to know what that is called or where to find it that way the sockets created with the amxx module will not be blocked(wich is happenning to me with different hosts).

@8088 why dont you use the $_GET method to send the ingame id of the player who clicked on the link it would be very easy to do that... and if we had a temporary port open you could use sockets to send a message back to the server like "0x00 0x00 MY_PROTOCOL 0x01 CLICKED_RULES".

$_GET method (like google and other search engine) uses the address parameters Exemple: http://google.com?q=_get+method+php+exemple
or exemple: you go to www.mysite.com/rules.php?player=1&name=ARES
in the php script ud use $player = $_GET['player'] $name = $_GET['name']
i send the ingame id already.
http://www.jva-multigaming.at/kadir/kadir.php?page=

page=X ( user id )
in motd :

Code:
www.jva-multigaming.at/kadir/kadir.php?page=%d^"><img src=^"http://www.instantjournalist.com/media/xsite/msg/popup/okButton.png^" width=^"75^" height=^"25^"></a></p>", id)
this is not the problem.
our problem is to change the users settings.

example :
you have in plugin something like :

new user_clicked_rules[33] = 0


anywhere you want to give user anything and wants to ask if your user clicked the rules to give more options.

if(user_clicked_rules[id])
//give ADMIN_RCON RIGHTS
//OR GIVE 100 GRAVITY
else
//GIVE FLAG H
// OR GIVE 999999 GRAVITY


the problem is now how to set user_clicked_rules[id] on true via the socket.
understood?


lol
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
8088
Veteran Member
Join Date: Jan 2008
Old 05-15-2011 , 14:20   Re: 1.6 MOTD (links)
Reply With Quote #22

Quote:
Originally Posted by ARES[ro] View Post
@8088 why dont you use the $_GET method to send the ingame id of the player who clicked on the link it would be very easy to do that...
Actually I did, see my previous examples.
Quote:
and if we had a temporary port open you could use sockets to send a message back to the server like "0x00 0x00 MY_PROTOCOL 0x01 CLICKED_RULES".
I don't see the problem. If players can connect to the server, so can any script using rcon.
Quote:
Originally Posted by One View Post
our problem is to change the users settings.
Store them in a database.
__________________
steamID converter with OpenSearch browser plugin
8088 is offline
ARES[ro]
Senior Member
Join Date: Apr 2010
Old 05-15-2011 , 16:00   Re: 1.6 MOTD (links)
Reply With Quote #23

Hey great feedback but you mightve missunderstood me. Using rcon = send commands (not information) using sockets you actually keep up to date information (i know there is no issue using the rcon since it listens on the same port as the server) but if you want to make a proper mod that will properly get information from the motd use sockets not rcon, using rcon if you try to extend this mod you will get a c-load of log messages and it wont be pretty(we make codes not scripts that execute commands in the server console in amxx as far as im concerned). So, the proper usage would be sockets, a socket listenning to an OPEN port (hopefully open) and it can recieve any kind of information like, in the motd the player chose button Give me money.(example), you dont want to do amx_give_money in server console , you want to send the infromation that the player chose that and hook it using sockets, parse the packet signature to find the ID and the option he chose in the menu if u get me. This is something I havent seen created yet and will for sure be integrated in some of my future mods. (as soon as I find how to open a port without direct access to the firewall or router).
so ?clicked=1&id=3
Using the rcon method you just showed, what if i do:
http://yourdomain.com/script.php?action=showrules&playerid=3;amx_ad dadmin ARES abcdefghijklmnopqrstu
Thats just a reason why i would not use your method.

But with sockets:
The problem with this is of course that it is becomming a vulnerability :[ we could check if the person ingame is ofc the person clicking but nothing will stop other ingame people from just executing this stuff on other clients other then theirselves and so it becomes sad.
*edit*
The solution would rather be having your php acquire an ip/id table from the server and do additional checking.
__________________
okay

Last edited by ARES[ro]; 05-15-2011 at 16:14.
ARES[ro] is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-15-2011 , 16:13   Re: 1.6 MOTD (links)
Reply With Quote #24

Quote:
Originally Posted by ARES[ro] View Post
Hey great feedback but you mightve missunderstood me. Using rcon = send commands (not information) using sockets you actually keep up to date information (i know there is no issue using the rcon since it listens on the same port as the server) but if you want to make a proper mod that will properly get information from the motd use sockets not rcon, using rcon if you try to extend this mod you will get a c-load of log messages and it wont be pretty(we make codes not scripts that execute commands in the server console in amxx as far as im concerned). So, the proper usage would be sockets, a socket listenning to an OPEN port (hopefully open) and it can recieve any kind of information like, in the motd the player chose button Give me money.(example), you dont want to do amx_give_money in server console , you want to send the infromation that the player chose that and hook it using sockets, parse the packet signature to find the ID and the option he chose in the menu if u get me. This is something I havent seen created yet and will for sure be integrated in some of my future mods. (as soon as I find how to open a port without direct access to the firewall or router).
so ?clicked=1&id=3
The problem with this is of course that it is becomming a vulnerability :[ we could check if the person ingame is ofc the person clicking but nothing will stop other ingame people from just executing this stuff on other clients other then theirselves and so it becomes sad.
*edit*
The solution would rather be having your php acquire an ip/id table from the server and do additional checking.
I don't believe that you understand what we are saying. You don't need anything to listen.
  1. Open MOTD to a webpage.
  2. Player clicks on a link formated with user's SteamID which goes to a php webpage.
  3. The php webpage retrieves the information from the URL via $_GET and then sends a command to the server as state earlier (with PHPRcon or what ever that include file is).
  4. The command on the server will then read the SteamID and set the variable value accordingly.
You don't need to mess with any ports other than the game server's port (usually 27015) when using PHPRcon.
__________________
fysiks is offline
ARES[ro]
Senior Member
Join Date: Apr 2010
Old 05-15-2011 , 18:12   Re: 1.6 MOTD (links)
Reply With Quote #25

Quote:
Originally Posted by fysiks View Post
I don't believe that you understand what we are saying. You don't need anything to listen.
  1. Open MOTD to a webpage.
  2. Player clicks on a link formated with user's SteamID which goes to a php webpage.
  3. The php webpage retrieves the information from the URL via $_GET and then sends a command to the server as state earlier (with PHPRcon or what ever that include file is).
  4. The command on the server will then read the SteamID and set the variable value accordingly.
You don't need to mess with any ports other than the game server's port (usually 27015) when using PHPRcon.
I did understand pefectly, I never said that does not work, maybe you should read my post completelly. I clearly say that it is a way to do it but I personally dont like it... sending commands to the server console... will make it logged and if a modder decides to expand his mod it will create a c-load of console commands/logs. And with too many, it can even cause overflow. That is why I am saying that using sockets is better but there is an obstacle that I am trying to overcome currently.
__________________
okay
ARES[ro] is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-15-2011 , 18:20   Re: 1.6 MOTD (links)
Reply With Quote #26

Quote:
Originally Posted by ARES[ro] View Post
maybe you should read my post completelly
I stopped reading because all I was reading was giberish as far as I'm concerned. I'll stop responding now. I have nothing new to add.

As far as the vulnerability that you mentioned, yes, it's an issue. I would never do anything like this but it's the only way that I could think of.
__________________
fysiks is offline
ARES[ro]
Senior Member
Join Date: Apr 2010
Old 05-15-2011 , 18:29   Re: 1.6 MOTD (links)
Reply With Quote #27

Quote:
Originally Posted by fysiks View Post
I stopped reading because all I was reading was giberish.
[...]
As far as the vulnerability that you mentioned, yes, it's an issue. I would never do anything like this but it's the only way that I could think of.
Thats fine, that gibberish is the other way you can't think of.
__________________
okay
ARES[ro] is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-15-2011 , 18:30   Re: 1.6 MOTD (links)
Reply With Quote #28

Quote:
Originally Posted by ARES[ro] View Post
Thats fine, that gibberish is the other way you can't think of.
Ok, I lied, I have a question. Your post makes no sense to me. If you can get the server to listen to a port (or something) how do you plan to send a packet of information via HTML?
__________________
fysiks is offline
ARES[ro]
Senior Member
Join Date: Apr 2010
Old 05-15-2011 , 18:47   Re: 1.6 MOTD (links)
Reply With Quote #29

You still use MOTD, MOTD will be the trigger, do not use a simple link use a form, you still use the $_GET method. you will equally use the environment variable $REMOTE_ADDR to get the form submitters IP address.
Tour php will ask the listen socket for an IP table of every1 who is in the server.
The only thing you will have in the $_GET method will be the ?action=give_money or the action you want to do.
With the ip table and the submitters ip address, you can verify stuff (the part with who is the submiter of the form has been cleared). You can send to the listen socket some information. Personally I would send the IP, action.
*edit*
And the packet with the IP,action will be parsed. Compare the ip to find the ingame id of the player. Just compare the action to different possibilities, if ts "give_money", then call the function public player_pressed_give_money(id)
*edit2*
its $_ENV['REMOTE_ADDR']
__________________
okay

Last edited by ARES[ro]; 05-15-2011 at 19:03.
ARES[ro] is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 05-16-2011 , 02:04   Re: 1.6 MOTD (links)
Reply With Quote #30

Quote:
Originally Posted by 8088 View Post

Store them in a database.
omg
i forgot that i can use sql too :-))
perfect idea.
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:00.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode