4 #include "../GbxRemote/GbxRemote.h"
5 #include "../Objects/Map.h"
6 #include "../Objects/Player.h"
7 #include "../Utils/Text.h"
36 bool Authenticate(std::string username, std::string password);
144 bool ChatForwardToLogin(std::string text, std::string sender, std::string destination =
"");
153 bool SendNotice(std::string text, std::string avatarLogin =
"",
int variant = 0);
163 bool SendNoticeToLogin(std::string login, std::string text, std::string avatarLogin =
"",
int variant = 0);
179 bool CallVote(std::string xmlRequest);
189 bool CallVoteEx(std::string xmlRequest,
double ratio,
int timeout,
int whoVotes);
401 std::vector<Map>
GetMapList(
int limit,
int index);
408 bool AddMap(std::string fileName);
415 int AddMapList(std::vector<std::string> fileNames);
std::vector< Map > GetMapList(int limit, int index)
Gets the maplist from the server.
Definition: MapInfo.cpp:67
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
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:460
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
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
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:10
bool Authenticate(std::string username, std::string password)
Authenticates with the server. Returns whether authentication was successful.
Definition: Global.cpp:3
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
ServerVersion GetVersion()
Returns server version information.
Definition: Global.cpp:87
bool CallVote(std::string xmlRequest)
Start callvote.
Definition: CallVote.cpp:3
std::vector< std::string > GetChatLines()
Get latest chat lines.
Definition: Chat.cpp:45
bool SetApiVersion(std::string version)
Sets the API version of the server. Returns whether change was successful.
Definition: Global.cpp:53
Struct with system information.
Definition: Structs.h:21
Contains all information about a map in easy-to-use format.
Definition: Map.h:10
std::map< std::string, Player > * playerList
Pointer to the playerlist.
Definition: Methods.h:461
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
Contains all server methods and returns usable data types.
Definition: Methods.h:14
Struct with server status.
Definition: Structs.h:39
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:8
bool SendNotice(std::string text, std::string avatarLogin="", int variant=0)
Send notice to all players.
Definition: Notice.cpp:3
Struct with a current callvote.
Definition: Structs.h:59
bool SendDisplayManialinkPageToLogin(std::string login, std::string page, int timeout, bool hideOnClick)
Displays ManiaLink page to a player.
Definition: ManiaLink.cpp:21
std::vector< ManiaLinkPageAnswer > GetManialinkPageAnswers()
Returns the latest results from the current ManiaLink page.
Definition: ManiaLink.cpp:70
bool ChatSendServerMessageToPlayer(std::string text, Player player)
Send chat message to player.
Definition: Chat.cpp:40
bool CancelVote()
Cancels the current callvote.
Definition: CallVote.cpp:38
bool SetCallVoteTimeOut(int timeout)
Sets the default callvote timeout.
Definition: CallVote.cpp:67
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
Map GetCurrentMapInfo()
Provides a map object for the map currently being played on the server.
Definition: MapInfo.cpp:3
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:91
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
CurrentNextValue GetCallVoteTimeOut()
Gets the default callvote timeout.
Definition: CallVote.cpp:83
ServerStatus GetStatus()
Returns server status.
Definition: Global.cpp:147
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
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
bool SetConnectionRates(int downloadRate, int uploadRate)
Sets the server connection rates.
Definition: Global.cpp:130
GbxError GetCurrentError()
Returns the current server error (from GbxRemote).
Definition: Methods.cpp:9
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
Methods(GbxRemote *serverPtr, std::map< std::string, Player > *playerListPtr)
Constructor with link to server connection.
Definition: Methods.cpp:3
bool CallVoteEx(std::string xmlRequest, double ratio, int timeout, int whoVotes)
Start callvote.
Definition: CallVote.cpp:19