#include <gameserver.h>

Public Member Functions | |
| GameServer (BotKernel *) | |
| Constructor. | |
| long | strToLong (string) |
| Convert a string to a long (seems fucked). | |
| string | getHLstring (unsigned int *, char *) |
| Get a string in HL1 protocol. | |
| char | getHLbyte (unsigned int *, char *) |
| Get a byte in HL1 protocol. | |
| string | getHLlong (unsigned int *, char *) |
| Get a long in HL1 protocol (as a string). | |
| bool | getHL1Players (vector< string > *, char *) |
| Get players list in HL1 protocol. | |
| bool | getHL1Challenge (string *, char *) |
| Get HL1 challenge. | |
| bool | getHL1Infos (map< string, string > *, char *) |
| Get HL1 server's settings. | |
| string | getQ3GameType (string) |
| Get a Q3 gametype according to a number. | |
| bool | parseWSWinfos (map< string, string > *, vector< string > *, char *) |
| Get warsow server's infos (settings and players). | |
| bool | parseQ3infos (map< string, string > *, vector< string > *, char *) |
| Get Q3 server's infos (settings and players). | |
| bool | sendQuery (string, string, int *, string) |
| Send a query to a server. | |
| string | getResult (int, char *) |
| Get a result from a server. | |
Provides tools to query game servers
Definition at line 44 of file gameserver.h.
| GameServer::GameServer | ( | BotKernel * | b | ) |
Constructor.
Constructor
Definition at line 34 of file gameserver.cpp.
References Plugin::author, Plugin::bindFunction(), Plugin::description, IN_COMMAND_HANDLER, Plugin::name, and Plugin::version.
| bool GameServer::getHL1Challenge | ( | string * | challenge, | |
| char * | datas | |||
| ) |
Get HL1 challenge.
Get challenge in HL1 protocol
| challenge | string that will contain the challenge | |
| datas | Datas to read |
Definition at line 141 of file gameserver.cpp.
References getHLbyte(), and getHLlong().
Referenced by hl().
| bool GameServer::getHL1Infos | ( | map< string, string > * | settings, | |
| char * | datas | |||
| ) |
Get HL1 server's settings.
Get HL server's info in HL1 protocol
| settings | Map that will contain settings | |
| datas | Datas to read |
Definition at line 156 of file gameserver.cpp.
References getHLbyte(), getHLlong(), and getHLstring().
Referenced by hl().
| bool GameServer::getHL1Players | ( | vector< string > * | players, | |
| char * | datas | |||
| ) |
Get players list in HL1 protocol.
Get players list in HL1 protocol
| players | players list to fill | |
| datas | Datas to read |
Definition at line 120 of file gameserver.cpp.
References getHLbyte(), and getHLstring().
Referenced by hl().
| char GameServer::getHLbyte | ( | unsigned int * | index, | |
| char * | datas | |||
| ) |
Get a byte in HL1 protocol.
Get a byte in HL1 protocol Read only one byte
| index | Index to read datas | |
| datas | Datas to read |
Definition at line 92 of file gameserver.cpp.
Referenced by getHL1Challenge(), getHL1Infos(), and getHL1Players().
| string GameServer::getHLlong | ( | unsigned int * | index, | |
| char * | datas | |||
| ) |
Get a long in HL1 protocol (as a string).
Get a long in HL1 protocol
| index | Index to read datas | |
| datas | Datas to read |
Definition at line 104 of file gameserver.cpp.
Referenced by getHL1Challenge(), and getHL1Infos().
| string GameServer::getHLstring | ( | unsigned int * | index, | |
| char * | datas | |||
| ) |
Get a string in HL1 protocol.
Get a string in HL1 protocol Read datas until a 0x00 char is found
| index | Index to read datas | |
| datas | Datas to read |
Definition at line 73 of file gameserver.cpp.
Referenced by getHL1Infos(), and getHL1Players().
| string GameServer::getQ3GameType | ( | string | number | ) |
Get a Q3 gametype according to a number.
Get a Q3 gametype according to a number
| number | gametype number |
Definition at line 192 of file gameserver.cpp.
Referenced by q3().
| string GameServer::getResult | ( | int | sock, | |
| char * | buffer | |||
| ) |
Get a result from a server.
Get a UDP result from a server
| sock | Socket used for communication | |
| buffer | Buffer that will contain result (answer) |
Definition at line 301 of file gameserver.cpp.
References MAX_CHARS.
| bool GameServer::parseQ3infos | ( | map< string, string > * | settings, | |
| vector< string > * | players, | |||
| char * | datas | |||
| ) |
Get Q3 server's infos (settings and players).
Parse datas to extract settings and players from a Q3 server
| settings | map that will contain settings | |
| players | vector that will contain players | |
| datas | Datas to read |
Definition at line 248 of file gameserver.cpp.
References Tools::parseQ3Colors(), and Tools::stringToVector().
Referenced by q3().
| bool GameServer::parseWSWinfos | ( | map< string, string > * | settings, | |
| vector< string > * | players, | |||
| char * | datas | |||
| ) |
Get warsow server's infos (settings and players).
Parse datas to extract settings and players from a warsow server
| settings | map that will contain settings | |
| players | vector that will contain players | |
| datas | Datas to read |
Definition at line 220 of file gameserver.cpp.
References Tools::parseQ3Colors(), and Tools::stringToVector().
Referenced by warsow().
| bool GameServer::sendQuery | ( | string | ip, | |
| string | port, | |||
| int * | sock, | |||
| string | query | |||
| ) |
Send a query to a server.
Send a UDP query to a server
| ip | Server' ip | |
| port | Server's posrt | |
| sock | Pointer to a socket | |
| query | Query to send |
Definition at line 274 of file gameserver.cpp.
References Tools::strToInt().
| long GameServer::strToLong | ( | string | str | ) |
Convert a string to a long (seems fucked).
Convert a string to a long (seems fucked) /!\ DOESN'T WORK /!\
| str | String to convert |
Definition at line 53 of file gameserver.cpp.
1.5.8