4 #include "../GbxRemote/GbxRemote.h" 
    5 #include "../Objects/Map.h" 
    6 #include "../Objects/Player.h" 
    7 #include "../Utils/Logging.h" 
    8 #include "../Utils/Text.h" 
   38     bool Authenticate(std::string username, std::string password);
 
  146     bool ChatForwardToLogin(std::string text, std::string sender, std::string destination = 
"");
 
  155     bool SendNotice(std::string text, std::string avatarLogin = 
"", 
int variant = 0);
 
  165     bool SendNoticeToLogin(std::string login, std::string text, std::string avatarLogin = 
"", 
int variant = 0);
 
  181     bool CallVote(std::string xmlRequest);
 
  191     bool CallVoteEx(std::string xmlRequest, 
double ratio, 
int timeout, 
int whoVotes);
 
  424     std::vector<Map> 
GetMapList(
int limit, 
int index);
 
  431     bool AddMap(std::string fileName);
 
  438     int AddMapList(std::vector<std::string> fileNames);
 
  495     std::string 
GetGhostReplay(std::string login, std::string fileName);
 
  518     bool Kick(std::string login, std::string message = 
"");
 
  526     bool Ban(std::string login, std::string message = 
"");
 
  535     bool BanAndBlackList(std::string login, std::string message, 
bool save = 
false);
 
  542     bool UnBan(std::string login);
 
  555     std::vector<BannedPlayer> 
GetBanList(
int amount, 
int index);
 
  582     std::vector<std::string> 
GetBlackList(
int amount, 
int index);
 
  623     std::vector<std::string> 
GetGuestList(
int amount, 
int index);
 
  644     bool Ignore(std::string login);
 
  664     std::vector<std::string> 
GetIgnoreList(
int amount, 
int index);
 
bool UnBlackList(std::string login)
Unblacklist a player from the server. 
Definition: PlayerActions.cpp:129
bool CleanIgnoreList()
Clear the ignorelist. 
Definition: PlayerActions.cpp:345
std::vector< Map > GetMapList(int limit, int index)
Gets the maplist from the server. 
Definition: MapInfo.cpp:67
bool LoadGuestList(std::string file)
Load the guestlist to the server. 
Definition: PlayerActions.cpp:281
bool IsRelayServer()
Returns whether the server is a relay server. 
Definition: Info.cpp:100
bool InsertMap(std::string fileName)
Insert the map with the specified filename after the current map. 
Definition: MapActions.cpp:67
bool SendNoticeToLogin(std::string login, std::string text, std::string avatarLogin="", int variant=0)
Send notice to player login. 
Definition: Notice.cpp:21
Handles communication with the ManiaPlanet server. 
Definition: GbxRemote.h:20
std::vector< CallVoteRatio > GetCallVoteRatios()
Gets the callvote ratios. 
Definition: CallVote.cpp:143
std::string GetValidationReplay(std::string login)
Retrieve validation replay by player login. 
Definition: Replays.cpp:6
bool SetServerComment(std::string comment)
Sets the server comment. 
Definition: Info.cpp:37
bool SetMaxPlayers(int limit)
Sets the playerlimit. 
Definition: Info.cpp:171
int ChooseNextMapList(std::vector< std::string > fileNames)
Set as next maps the list of maps with the specified filenames, if they are present in the selection...
Definition: MapActions.cpp:115
Map GetNextMapInfo()
Provides a map object for the map being played next on the server. 
Definition: MapInfo.cpp:18
GbxRemote * server
Pointer to GbxRemote. 
Definition: Methods.h:699
std::string GetServerPassword()
Gets the server password. 
Definition: Info.cpp:129
bool SetCallVoteRatios(std::vector< CallVoteRatio > ratios)
Sets the callvote ratios. 
Definition: CallVote.cpp:127
bool SendHideManialinkPage()
Hides all ManiaLink pages for all players. 
Definition: ManiaLink.cpp:41
Map GetMapInfo(std::string fileName)
Provides a map object for the map with the specified file name. 
Definition: MapInfo.cpp:33
bool CleanBanList()
Clear the banlist. 
Definition: PlayerActions.cpp:73
bool SetServerPassword(std::string password)
Sets the server password. 
Definition: Info.cpp:113
CurrentCallVote GetCurrentCallVote()
Returns the current callvote. 
Definition: CallVote.cpp:51
bool ChatForwardToLogin(std::string text, std::string sender, std::string destination="")
Forwards chat message to player. 
Definition: Chat.cpp:78
bool EnableCallbacks(bool enable)
Enables/disables callbacks. Returns whether change was successful. 
Definition: Global.cpp:37
bool QuitGame()
Quit the server. 
Definition: Global.cpp:163
bool SetServerPasswordForSpectator(std::string password)
Sets the spectator password. 
Definition: Info.cpp:142
std::vector< std::string > ListMethods()
Returns list of available server methods. 
Definition: Global.cpp:69
Contains all information about a player in easy-to-use format. 
Definition: Player.h:11
bool Authenticate(std::string username, std::string password)
Authenticates with the server. Returns whether authentication was successful. 
Definition: Global.cpp:3
bool Ban(std::string login, std::string message="")
Ban a player from the server. 
Definition: PlayerActions.cpp:21
int InsertMapList(std::vector< std::string > fileNames)
Insert the list of maps with the specified filenames after the current map. 
Definition: MapActions.cpp:83
bool AddMap(std::string fileName)
Add the map with the specified filename at the end of the current selection. 
Definition: MapActions.cpp:3
bool ChatSendServerMessageToLogin(std::string text, std::string login)
Send chat message to player login. 
Definition: Chat.cpp:21
std::vector< BannedPlayer > GetBanList(int amount, int index)
Retrieve the banlist. 
Definition: PlayerActions.cpp:86
bool SetHideServer(int setting)
Sets the hide setting of the server. 
Definition: Info.cpp:71
ServerVersion GetVersion()
Returns server version information. 
Definition: Global.cpp:87
bool CallVote(std::string xmlRequest)
Start callvote. 
Definition: CallVote.cpp:3
std::string GetGhostReplay(std::string login, std::string fileName)
Retrieve ghost replay by player login. 
Definition: Replays.cpp:22
std::vector< std::string > GetChatLines()
Get latest chat lines. 
Definition: Chat.cpp:45
GameMode GetGameMode()
Get the game mode (0 = Script, 1 = Rounds, 2 = TimeAttack, 3 = Team, 4 = Laps, 5 = Cup...
Definition: Game.cpp:20
bool BlackList(std::string login)
Blacklist a player from the server. 
Definition: PlayerActions.cpp:113
bool SetApiVersion(std::string version)
Sets the API version of the server. Returns whether change was successful. 
Definition: Global.cpp:53
std::vector< std::string > GetBlackList(int amount, int index)
Retrieve the blacklist. 
Definition: PlayerActions.cpp:158
bool SaveBlackList(std::string file)
Save the blacklist from the server. 
Definition: PlayerActions.cpp:197
Struct with system information. 
Definition: Structs.h:23
bool RemoveGuest(std::string login)
Remove a player as guest on the server. 
Definition: PlayerActions.cpp:229
bool LoadBlackList(std::string file)
Load the blacklist to the server. 
Definition: PlayerActions.cpp:181
Contains all information about a map in easy-to-use format. 
Definition: Map.h:14
bool Ignore(std::string login)
Ignore a player on the server. 
Definition: PlayerActions.cpp:313
bool CleanBlackList()
Clear the blacklist. 
Definition: PlayerActions.cpp:145
std::map< std::string, Player > * playerList
Pointer to the playerlist. 
Definition: Methods.h:700
bool SendHideManialinkPageToLogin(std::string login)
Hides all ManiaLink pages for a player. 
Definition: ManiaLink.cpp:54
bool SendDisplayManialinkPage(std::string page, int timeout, bool hideOnClick)
Displays ManiaLink page to all players. 
Definition: ManiaLink.cpp:3
bool SetServerName(std::string name)
Sets the server name. 
Definition: Info.cpp:3
Contains all server methods and returns usable data types. 
Definition: Methods.h:15
bool BanAndBlackList(std::string login, std::string message, bool save=false)
Ban and blacklist a player from the server. 
Definition: PlayerActions.cpp:39
bool SetMaxSpectators(int limit)
Sets the spectatorlimit. 
Definition: Info.cpp:207
ServerInfo * serverInfo
Pointer to the server information. 
Definition: Methods.h:701
Struct with server status. 
Definition: Structs.h:60
bool RemoveMap(std::string fileName)
Remove the map with the specified filename from the current selection. 
Definition: MapActions.cpp:35
bool SetCallVoteRatio(double ratio)
Sets the default callvote ratio. 
Definition: CallVote.cpp:98
Struct with server version information. 
Definition: Structs.h:10
bool SendNotice(std::string text, std::string avatarLogin="", int variant=0)
Send notice to all players. 
Definition: Notice.cpp:3
bool UnBan(std::string login)
Unban a player from the server. 
Definition: PlayerActions.cpp:57
bool Kick(std::string login, std::string message="")
Kick a player from the server. 
Definition: PlayerActions.cpp:3
std::string GameDataDirectory()
Retrieve the location of the GameData directory. 
Definition: Directories.cpp:3
Struct with a current callvote. 
Definition: Structs.h:80
std::string GetMapsDirectory()
Retrieve the location of the maps directory. 
Definition: Directories.cpp:16
bool CleanGuestList()
Clear the guestlist. 
Definition: PlayerActions.cpp:245
bool SetGameMode(GameMode mode)
Sets the game mode (0 = Script, 1 = Rounds, 2 = TimeAttack, 3 = Team, 4 = Laps, 5 = Cup...
Definition: Game.cpp:3
CurrentNextValue GetMaxSpectators()
Gets the spectatorlimit. 
Definition: Info.cpp:228
bool SendDisplayManialinkPageToLogin(std::string login, std::string page, int timeout, bool hideOnClick)
Displays ManiaLink page to a player. 
Definition: ManiaLink.cpp:21
int GetHideServer()
Gets the hide setting of the server (0 = visible, 1 = always hidden, 2 = hidden from nations)...
Definition: Info.cpp:87
std::vector< ManiaLinkPageAnswer > GetManialinkPageAnswers()
Returns the latest results from the current ManiaLink page. 
Definition: ManiaLink.cpp:70
std::vector< std::string > GetGuestList(int amount, int index)
Retrieve the guestlist. 
Definition: PlayerActions.cpp:258
bool ChatSendServerMessageToPlayer(std::string text, Player player)
Send chat message to player. 
Definition: Chat.cpp:40
std::string GetSkinsDirectory()
Retrieve the location of the skins directory. 
Definition: Directories.cpp:29
bool CancelVote()
Cancels the current callvote. 
Definition: CallVote.cpp:38
bool SetCallVoteTimeOut(int timeout)
Sets the default callvote timeout. 
Definition: CallVote.cpp:67
std::vector< std::string > GetIgnoreList(int amount, int index)
Retrieve the ignorelist. 
Definition: PlayerActions.cpp:358
bool ChatEnableManualRouting(bool enable, bool autoForward)
Enable/disable manual chat routing. 
Definition: Chat.cpp:61
SystemInfo GetSystemInfo()
Returns system information. 
Definition: Global.cpp:106
Stores error details from the communication with the server. 
Definition: GbxStructs.h:27
bool SaveGuestList(std::string file)
Save the guestlist from the server. 
Definition: PlayerActions.cpp:297
Map GetCurrentMapInfo()
Provides a map object for the map currently being played on the server. 
Definition: MapInfo.cpp:3
std::string GetServerName()
Returns the current server name. 
Definition: Info.cpp:24
bool ChatSendServerMessage(std::string text)
Send chat message to all players. 
Definition: Chat.cpp:3
bool SendOpenLinkToLogin(std::string login, std::string link, int linkType)
Send link to player login. 
Definition: Notice.cpp:40
Struct with a current and next value. 
Definition: Structs.h:112
int AddMapList(std::vector< std::string > fileNames)
Add the list of maps with the specified filenames at the end of the current selection. 
Definition: MapActions.cpp:19
bool SetCallVoteRatiosEx(bool replaceAll, std::vector< ExtendedCallVoteRatio > ratios)
Sets the callvote ratios. 
Definition: CallVote.cpp:166
bool UnIgnore(std::string login)
Unignore a player on the server. 
Definition: PlayerActions.cpp:329
CurrentNextValue GetCallVoteTimeOut()
Gets the default callvote timeout. 
Definition: CallVote.cpp:83
ServerStatus GetStatus()
Returns server status. 
Definition: Global.cpp:147
bool AddGuest(std::string login)
Add a player as guest on the server. 
Definition: PlayerActions.cpp:213
std::vector< ExtendedCallVoteRatio > GetCallVoteRatiosEx()
Gets the callvote ratios. 
Definition: CallVote.cpp:196
bool CheckMapForCurrentServerParams(std::string fileName)
Checks if the map matches the current server settings. 
Definition: MapInfo.cpp:51
std::string GetServerPasswordForSpectator()
Gets the spectator password. 
Definition: Info.cpp:158
bool ChooseNextMap(std::string fileName)
Set as next map the one with the specified filename, if it is present in the selection. 
Definition: MapActions.cpp:99
double GetCallVoteRatio()
Gets the default callvote ratio. 
Definition: CallVote.cpp:114
Methods(GbxRemote *serverPtr, std::map< std::string, Player > *playerListPtr, ServerInfo *serverInfoPtr)
Constructor with link to server connection. 
Definition: Methods.cpp:3
bool SetConnectionRates(int downloadRate, int uploadRate)
Sets the server connection rates. 
Definition: Global.cpp:130
CurrentNextValue GetMaxPlayers()
Gets the playerlimit. 
Definition: Info.cpp:192
GbxError GetCurrentError()
Returns the current server error (from GbxRemote). 
Definition: Methods.cpp:10
bool ChangeAuthPassword(std::string username, std::string password)
Changes authentication passwordd. Returns whether change was successful. 
Definition: Global.cpp:20
int RemoveMapList(std::vector< std::string > fileNames)
Remove the list of maps with the specified filenames from the current selection. 
Definition: MapActions.cpp:51
Struct with server information. 
Definition: Structs.h:41
std::string GetServerComment()
Returns the current server comment. 
Definition: Info.cpp:58
bool CallVoteEx(std::string xmlRequest, double ratio, int timeout, int whoVotes)
Start callvote. 
Definition: CallVote.cpp:19