Class Connection
Dedicated Server Connection Instance Methods returns nothing if $multicall = true
public static
|
|
public static
|
|
protected
|
|
protected
|
|
public
|
|
public
|
#
executeMulticall( )
Execute the calls in queue and return the result TODO Prendre en compte les retours du mutliQuery (via un handler ?) |
protected
|
|
public
array
|
#
methodSignature( string $methodName )
Given the name of a method, return an array of legal signatures. Each signature is an array of strings. The first item of each signature is the return type, and any others items are parameter types. |
public
boolean
|
#
changeAuthPassword( string $username, string $password )
Change the password for the specified login/user. |
public
boolean
|
#
enableCallbacks( boolean $enable, boolean $multicall = false )
Allow the GameServer to call you back. |
public
boolean
|
|
public
|
#
getVersion( )
Returns a struct with the Name, Version, Build and ApiVersion of the application remotely controled. |
public
|
|
public
|
#
callVote(
Call a vote for a cmd. The command is a XML string corresponding to an XmlRpc request. You can additionally specifiy specific parameters for this vote: a ratio, a time out and who is voting. Special timeout values: a timeout of '0' means default, '1' means indefinite; a ratio of '-1' means default; Voters values: '0' means only active players, '1' means any player, '2' is for everybody, pure spectators included. |
public
|
#
callVoteKick(
Call a vote to kick a player. You can additionally specifiy specific parameters for this vote: a ratio, a time out and who is voting. Special timeout values: a timeout of '0' means default, '1' means indefinite; a ratio of '-1' means default; Voters values: '0' means only active players, '1' means any player, '2' is for everybody, pure spectators included. |
public
|
#
callVoteBan(
Call a vote to ban a player. You can additionally specifiy specific parameters for this vote: a ratio, a time out and who is voting. Special timeout values: a timeout of '0' means default, '1' means indefinite; a ratio of '-1' means default; Voters values: '0' means only active players, '1' means any player, '2' is for everybody, pure spectators included. |
public
|
#
callVoteRestartMap( float $ratio = 0.5, integer $timeout = 0, integer $voters = 1, boolean $multicall = false )
Call a vote to restart the current Map. You can additionally specifiy specific parameters for this vote: a ratio, a time out and who is voting. Special timeout values: a timeout of '0' means default, '1' means indefinite; a ratio of '-1' means default; Voters values: '0' means only active players, '1' means any player, '2' is for everybody, pure spectators included. |
public
|
#
callVoteNextMap( float $ratio = 0.5, integer $timeout = 0, integer $voters = 1, boolean $multicall = false )
Call a vote to go to the next Map. You can additionally specifiy specific parameters for this vote: a ratio, a time out and who is voting. Special timeout values: a timeout of '0' means default, '1' means indefinite; a ratio of '-1' means default; Voters values: '0' means only active players, '1' means any player, '2' is for everybody, pure spectators included. |
protected
boolean
|
|
public
boolean
|
|
public
|
#
getCurrentCallVote( )
Returns the vote currently in progress. The returned structure is { CallerLogin, CmdName, CmdParam }. |
public
boolean
|
#
setCallVoteTimeOut( integer $timeout, boolean $multicall = false )
Set a new timeout for waiting for votes. A zero value disables callvote. Requires a map restart to be taken into account |
public
array
|
#
getCallVoteTimeOut( )
Get the current and next timeout for waiting for votes. The struct returned contains two fields 'CurrentValue' and 'NextValue'. |
public
boolean
|
#
setCallVoteRatio( float $ratio, boolean $multicall = false )
Set a new default ratio for passing a vote. Must lie between 0 and 1. |
public
float
|
#
getCallVoteRatio( )
Get the current default ratio for passing a vote. This value lies between 0 and 1. |
public
boolean
|
#
setCallVoteRatios( array $ratios, boolean $multicall = false )
Set new ratios for passing specific votes. The parameter is an array of struct {string votecommand, double ratio}, ratio is in [0,1] or -1 for vote disabled. |
public
array
|
|
public
boolean
|
#
chatSendServerMessageToLanguage( array $messages,
Send a localised text message to specied clients. The parameter is an array of structures {Lang='??', Text='...'}. If no matching language is found, the last text in the array is used. |
public
boolean
|
#
chatSendServerMessage( string $message,
Send a text message without the server login to everyone if players is null. Players can be a Structures\Player object or an array of Structures\Player |
public
boolean
|
#
chatSendToLanguage( array $messages,
Send a localised text message to selected clients. The parameter is an array of structures {Lang='??', Text='...'}. If no matching language is found, the last text in the array is used. |
public
boolean
|
#
chatSend( string $message,
Send a text message to every Structures\Player or the a specified player(s). If Structures\Player is null, the message will be delivered to every Structures\Player |
public
array
|
|
public
boolean
|
#
chatEnableManualRouting( boolean $enable, boolean $serverAutomaticForward = false, boolean $multicall = false )
The chat messages are no longer dispatched to the players, they only go to the rpc callback and the controller has to manually forward them. The second (optional) parameter allows all messages from the server to be automatically forwarded. |
public
boolean
|
#
chatForwardToLogin( string $message,
(Text, SenderLogin, DestLogin) Send a text message to the specified DestLogin (or everybody if empty) on behalf of SenderLogin. DestLogin can be a single login or a list of comma-separated logins. Only available if manual routing is enabled. |
public
boolean
|
#
sendNotice( string $receiver,
Display a notice on the client with the specified UId. The parameters are : the Uid of the client to whom the notice is sent, the text message to display, the UId of the avatar to display next to it (or '255' for no avatar), an optional 'max duration' in seconds (default: 3). |
public
boolean
|
#
sendDisplayManialinkPage( null|
Display a manialink page on the client of the specified Structures\Player(s). The first parameter is the login of the player, the other are identical to 'SendDisplayManialinkPage'. The players can be an object of player Type or an array of Structures\Player object |
public
boolean
|
#
sendHideManialinkPage( null|
Hide the displayed manialink page on the client with the specified login. Login can be a single login or a list of comma-separated logins. |
public
array
|
#
getManialinkPageAnswers( )
Returns the latest results from the current manialink page, as an array of structs {string Login, int PlayerId, int Result} Result==0 -> no answer, Result>0.... -> answer from the player. |
public
boolean
|
#
kick(
Kick the player with an optional message. |
public
boolean
|
#
ban(
Ban the player with an optional message. |
public
boolean
|
#
banAndBlackList(
Ban the player with a message. Add it to the black list, and optionally save the new list. |
public
boolean
|
#
unBan(
Unban the player |
public
boolean
|
|
public
|
#
getBanList( integer $length, integer $offset )
Returns the list of banned players. This method takes two parameters. The first parameter specifies the maximum number of infos to be returned, the second one the starting index in the list. The list is an array of structures. Each structure contains the following fields : Login, ClientName and IPAddress. |
public
boolean
|
#
blackList(
Blacklist the player |
public
boolean
|
#
unBlackList(
UnBlackList the player |
public
boolean
|
|
public
|
#
getBlackList( integer $length, integer $offset )
Returns the list of blacklisted players. This method takes two parameters. The first parameter specifies the maximum number of infos to be returned, the second one the starting index in the list. The list is an array of structures. Each structure contains the following fields : Login. |
public
boolean
|
#
loadBlackList( string $filename, boolean $multicall = false )
Load the black list file with the specified file name. |
public
boolean
|
#
saveBlackList( string $filename, boolean $multicall = false )
Save the black list in the file with specified file name. |
public
boolean
|
#
addGuest(
Add the player to the guest list. |
public
boolean
|
#
removeGuest(
Remove the player from the guest list. |
public
boolean
|
|
public
|
#
getGuestList( integer $length, integer $offset )
Returns the list of players on the guest list. This method takes two parameters. The first parameter specifies the maximum number of infos to be returned, the second one the starting index in the list. The list is an array of structures. Each structure contains the following fields : Login. |
public
boolean
|
|
public
boolean
|
#
saveGuestList( string $filename, boolean $multicall = false )
Save the guest list in the file with specified file name. |
public
boolean
|
#
setBuddyNotification( null|
Sets whether buddy notifications should be sent in the chat. login is the login of the player, or '' for global setting, enabled is the value. |
public
boolean
|
#
getBuddyNotification( null|
Gets whether buddy notifications are enabled for login, or '' to get the global setting. |
public
boolean
|
|
public
boolean
|
#
writeFileFromString( string $filename, string $data, boolean $multicall = false )
Write the data to the specified file. The filename is relative to the Tracks path |
public
boolean
|
#
tunnelSendData(
Send the data to the specified player. Login can be a single login or a list of comma-separated logins. |
public
boolean
|
#
tunnelSendDataFromString(
Send the data to the specified player. Login can be a single login or a list of comma-separated logins. |
public
boolean
|
#
dedicatedEcho( string $message, string $callback = '', boolean $multicall = false )
Just log the parameters and invoke a callback. Can be used to talk to other xmlrpc clients connected, or to make custom votes. If used in a callvote, the first parameter will be used as the vote message on the clients. |
public
boolean
|
#
ignore(
Ignore the specified Structures\Player. |
public
boolean
|
#
unIgnore(
Unignore the specified player. |
public
boolean
|
|
public
|
#
getIgnoreList( integer $length, integer $offset )
Returns the list of ignored players. This method takes two parameters. The first parameter specifies the maximum number of infos to be returned, the second one the starting index in the list. The list is an array of structures. Each structure contains the following fields : Login. |
public
integer
|
#
pay(
Pay coppers from the server account to a player, returns the BillId. This method takes three parameters: Login of the payee, Coppers to pay and Label to send with the payment. The creation of the transaction itself may cost coppers, so you need to have coppers on the server account. |
public
integer
|
#
sendBill(
Create a bill, send it to a player, and return the BillId. This method takes four parameters: LoginFrom of the payer, Coppers the player has to pay, Label of the transaction and optional LoginTo of the payee (if empty string, then the server account is used). The creation of the transaction itself may cost coppers, so you need to have coppers on the server account. |
public
|
#
getBillState( integer $billId )
Returns the current state of a bill. This method takes one parameter, the BillId. Returns a struct containing State, StateName and TransactionId. Possible enum values are: CreatingTransaction, Issued, ValidatingPayement, Payed, Refused, Error. |
public
integer
|
|
public
|
#
getSystemInfo( )
Get some system infos. Return a struct containing: PublishedIp, Port, P2PPort, ServerLogin, ServerPlayerId |
public
boolean
|
#
setConnectionRates( integer $downloadRate, integer $uploadRate, boolean $multicall = false )
Sets up- and download speed for the server in kbps. |
public
boolean
|
#
setServerName( string $serverName, boolean $multicall = false )
Set a new server name in utf8 format. |
public
string
|
|
public
boolean
|
#
setServerComment( string $serverComment, boolean $multicall = false )
Set a new server comment in utf8 format. |
public
string
|
|
public
boolean
|
#
setHideServer( integer $visibility, boolean $multicall = false )
Set whether the server should be hidden from the public server list (0 = visible, 1 = always hidden, 2 = hidden from nations). |
public
string
|
|
public
boolean
|
|
public
boolean
|
#
setServerPassword( string $serverPassword, boolean $multicall = false )
Set a new password for the server. |
public
boolean|string
|
#
getServerPassword( )
Get the server password if called as Admin or Super Admin, else returns if a password is needed or not. Get the server name in utf8 format. |
public
boolean
|
#
setServerPasswordForSpectator( string $serverPassword, boolean $multicall = false )
Set a new password for the spectator mode. |
public
boolean|string
|
#
getServerPasswordForSpectator( )
Get the password for spectator mode if called as Admin or Super Admin, else returns if a password is needed or not. |
public
boolean
|
#
setMaxPlayers( integer $maxPlayers, boolean $multicall = false )
Set a new maximum number of players. Requires a map restart to be taken into account. |
public
array
|
#
getMaxPlayers( )
Get the current and next maximum number of players allowed on server. The struct returned contains two fields CurrentValue and NextValue. |
public
boolean
|
#
setMaxSpectators( integer $maxSpectators, boolean $multicall = false )
Set a new maximum number of spectators. Requires a map restart to be taken into account. |
public
array
|
#
getMaxSpectators( )
Get the current and next maximum number of spectators allowed on server. The struct returned contains two fields CurrentValue and NextValue. |
public
boolean
|
#
enableP2PUpload( boolean $enable, boolean $multicall = false )
Enable or disable peer-to-peer upload from server. |
public
boolean
|
|
public
boolean
|
#
enableP2PDownload( boolean $enable, boolean $multicall = false )
Enable or disable peer-to-peer download from server. |
public
boolean
|
|
public
boolean
|
#
allowMapDownload( boolean $allow, boolean $multicall = false )
Allow clients to download maps from the server. |
public
boolean
|
|
public
boolean
|
#
autoSaveReplays( boolean $enable, boolean $multicall = false )
Enable the autosaving of all replays (vizualisable replays with all players, but not validable) on the server. |
public
boolean
|
|
public
boolean
|
#
autoSaveValidationReplays( boolean $enable, boolean $multicall = false )
Enable the autosaving on the server of validation replays, every time a player makes a new time. |
public
boolean
|
#
isAutoSaveValidationReplaysEnabled( )
Returns if autosaving of validation replays is enabled on the server. |
public
boolean
|
#
saveCurrentReplay( string $filename = '', boolean $multicall = false )
Saves the current replay (vizualisable replays with all players, but not validable). Pass a filename, or '' for an automatic filename. |
public
boolean
|
#
saveBestGhostsReplay( null|
Saves a replay with the ghost of all the players' best race. First parameter is the player object(or null for all players), Second parameter is the filename, or '' for an automatic filename. |
public
string
|
#
getValidationReplay(
Returns a replay containing the data needed to validate the current best time of the player. The parameter is the login of the player. |
public
boolean
|
#
setLadderMode( integer $mode, boolean $multicall = false )
Set a new ladder mode between ladder disabled (0) and forced (1). Requires a map restart to be taken into account. |
public
array
|
#
getLadderMode( )
Get the current and next ladder mode on server. The struct returned contains two fields CurrentValue and NextValue. |
public
array
|
#
getLadderServerLimits( )
Get the ladder points limit for the players allowed on this server. The struct returned contains two fields LadderServerLimitMin and LadderServerLimitMax. |
public
boolean
|
#
setVehicleNetQuality( integer $quality, boolean $multicall = false )
Set the network vehicle quality to Fast (0) or High (1). Requires a map restart to be taken into account. |
public
array
|
#
getVehicleNetQuality( mixed $multicall = false )
Get the current and next network vehicle quality on server. The struct returned contains two fields CurrentValue and NextValue. |
public
boolean
|
#
setServerOptions( array $options, boolean $multicall = false )
Set new server options using the struct passed as parameters. This struct must contain the following fields : Name, Comment, Password, PasswordForSpectator, NextMaxPlayers, NextMaxSpectators, IsP2PUpload, IsP2PDownload, NextLadderMode, NextVehicleNetQuality, NextCallVoteTimeOut, CallVoteRatio, AllowMapDownload, AutoSaveReplays, |
public
|
#
getServerOptions( integer $compatibility = 1 )
Optional parameter for compatibility: struct version (0 = united, 1 = forever). Returns a struct containing the server options: Name, Comment, Password, PasswordForSpectator, CurrentMaxPlayers, NextMaxPlayers, CurrentMaxSpectators, NextMaxSpectators, IsP2PUpload, IsP2PDownload, CurrentLadderMode, NextLadderMode, CurrentVehicleNetQuality, NextVehicleNetQuality, CurrentCallVoteTimeOut, NextCallVoteTimeOut, CallVoteRatio, AllowMapDownload and AutoSaveReplays, |
public
boolean
|
#
setServerPackMask( string $packMask, boolean $multicall = false )
Defines the packmask of the server. Can be 'United', 'Nations', 'Sunrise', 'Original', or any of the environment names. (Only maps matching the packmask will be allowed on the server, so that player connecting to it know what to expect.) Only available when the server is stopped. |
public
string
|
|
public
boolean
|
#
setForcedMods( boolean $override, array $mods, boolean $multicall = false )
Set the mods to apply on the clients. Parameters: Override, if true even the maps with a mod will be overridden by the server setting; Mods, an array of structures [{EnvName, Url}, ...]. Requires a map restart to be taken into account. |
public
array
|
|
public
|
#
setForcedMusic( boolean $override, string $music, boolean $multicall = false )
Set the music to play on the clients. Parameters: Override, if true even the maps with a custom music will be overridden by the server setting, UrlOrFileName for the music. Requires a map restart to be taken into account |
public
|
|
public
boolean
|
#
setForcedSkins( array $skins, boolean $multicall = false )
Defines a list of remappings for player skins. It expects a list of structs Orig, Name, Checksum, Url. Orig is the name of the skin to remap, or '*' for any other. Name, Checksum, Url define the skin to use. (They are optional, you may set value '' for any of those. All 3 null means same as Orig). Will only affect players connecting after the value is set. |
public
|
|
public
string
|
|
public
boolean
|
#
setRefereePassword( string $refereePassword, boolean $multicall = false )
Set a new password for the referee mode. |
public
boolean|string
|
#
getRefereePassword( )
Get the password for referee mode if called as Admin or Super Admin, else returns if a password is needed or not. |
public
boolean
|
#
setRefereeMode( integer $refereeMode, boolean $multicall = false )
Set the referee validation mode. 0 = validate the top3 players, 1 = validate all players. Only available to Admin. |
public
boolean|string
|
|
public
boolean
|
#
setUseChangingValidationSeed( boolean $enable, boolean $multicall = false )
Set whether the game should use a variable validation seed or not. Requires a map restart to be taken into account. |
public
array
|
#
getUseChangingValidationSeed( )
Get the current and next value of UseChangingValidationSeed. The struct returned contains two fields CurrentValue and NextValue. |
public
boolean
|
#
setClientInputsMaxLatency( integer $latency, boolean $multicall = false )
Set the maximum time the server must wait for inputs from the clients before dropping data, or '0' for auto-adaptation. Only used by ShootMania. Only available to Admin. |
public
integer
|
|
public
boolean
|
|
public
boolean
|
|
public
string
|
|
public
boolean
|
#
setModeScriptText( string $script, boolean $multicall = false )
Set the rules script and restart. Only available to Admin. TODO Check if correct |
public
array
|
|
public
|
#
setModeScriptVariables( array $variables, boolean $multicall = false )
Set the variables of the rules script. Only available to Admin. |
public
boolean
|
#
triggerModeScriptEvent( string $param1, srting $param2, boolean $multicall = false )
Send an event to the rules script. Only available to Admin. |
public
|
#
getModeScriptInfo( )
Returns the description of the current rules script, as a structure containing: Name, CompatibleTypes, Description and the settings available. |
public
array
|
|
public
boolean
|
#
setModeScriptSettings( array $rules, boolean $multicall = false )
Set the parameters of the rules script. Only available to Admin. |
public
boolean
|
#
restartMap( boolean $dontClearCupScores = false, boolean $multicall = false )
Restarts the map, with an optional boolean parameter DontClearCupScores (only available in cup mode). |
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
#
forceEndRound( boolean $multicall = false )
In Rounds or Laps mode, force the end of round without waiting for all players to giveup/finish. |
public
boolean
|
#
setGameInfos(
Set new game settings using the struct passed as parameters. This struct must contain the following fields : GameMode, ChatTime, RoundsPointsLimit, RoundsUseNewRules, RoundsForcedLaps, TimeAttackLimit, TimeAttackSynchStartPeriod, TeamPointsLimit, TeamMaxPoints, TeamUseNewRules, LapsNbLaps, LapsTimeLimit, FinishTimeout, and optionally: AllWarmUpDuration, DisableRespawn, ForceShowAllOpponents, RoundsPointsLimitNewRules, TeamPointsLimitNewRules, CupPointsLimit, CupRoundsPerMap, CupNbWinners, CupWarmUpDuration. Requires a map restart to be taken into account. |
public
|
#
getCurrentGameInfo( integer $compatibility = 1 )
Optional parameter for compatibility: struct version (0 = united, 1 = forever). Returns a struct containing the current game settings, ie: GameMode, ChatTime, NbMap, RoundsPointsLimit, RoundsUseNewRules, RoundsForcedLaps, TimeAttackLimit, TimeAttackSynchStartPeriod, TeamPointsLimit, TeamMaxPoints, TeamUseNewRules, LapsNbLaps, LapsTimeLimit, FinishTimeout, additionally for version 1: AllWarmUpDuration, DisableRespawn, ForceShowAllOpponents, RoundsPointsLimitNewRules, TeamPointsLimitNewRules, CupPointsLimit, CupRoundsPerMap, CupNbWinners, CupWarmUpDuration. |
public
|
#
getNextGameInfo( integer $compatibility = 1 )
Optional parameter for compatibility: struct version (0 = united, 1 = forever). Returns a struct containing the game settings for the next map, ie: GameMode, ChatTime, NbMap, RoundsPointsLimit, RoundsUseNewRules, RoundsForcedLaps, TimeAttackLimit, TimeAttackSynchStartPeriod, TeamPointsLimit, TeamMaxPoints, TeamUseNewRules, LapsNbLaps, LapsTimeLimit, FinishTimeout, additionally for version 1: AllWarmUpDuration, DisableRespawn, ForceShowAllOpponents, RoundsPointsLimitNewRules, TeamPointsLimitNewRules, CupPointsLimit, CupRoundsPerMap, CupNbWinners, CupWarmUpDuration. |
public
|
#
getGameInfos( integer $compatibility = 1 )
Optional parameter for compatibility: struct version (0 = united, 1 = forever). Returns a struct containing two other structures, the first containing the current game settings and the second the game settings for next map. The first structure is named CurrentGameInfos and the second NextGameInfos. |
public
boolean
|
#
setGameMode( integer $gameMode, boolean $multicall = false )
Set a new game mode between Rounds (0), TimeAttack (1), Team (2), Laps (3), Stunts (4) and Cup (5). Requires a map restart to be taken into account. |
public
integer
|
|
public
boolean
|
#
setChatTime( integer $chatTime, boolean $multicall = false )
Set a new chat time value in milliseconds (actually 'chat time' is the duration of the end race podium, 0 means no podium displayed.). |
public
array
|
#
getChatTime( )
Get the current and next chat time. The struct returned contains two fields CurrentValue and NextValue. |
public
boolean
|
#
setFinishTimeout( integer $finishTimeout, boolean $multicall = false )
Set a new finish timeout (for rounds/laps mode) value in milliseconds. 0 means default. 1 means adaptative to the duration of the map. Requires a map restart to be taken into account. |
public
array
|
#
getFinishTimeout( )
Get the current and next FinishTimeout. The struct returned contains two fields CurrentValue and NextValue. |
public
boolean
|
#
setAllWarmUpDuration( integer $warmUpDuration, boolean $multicall = false )
Set whether to enable the automatic warm-up phase in all modes. 0 = no, otherwise it's the duration of the phase, expressed in number of rounds (in rounds/team mode), or in number of times the gold medal time (other modes). Requires a map restart to be taken into account. |
public
array
|
#
getAllWarmUpDuration( )
Get whether the automatic warm-up phase is enabled in all modes. The struct returned contains two fields CurrentValue and NextValue. |
public
boolean
|
#
setDisableRespawn( boolean $disableRespawn, boolean $multicall = false )
Set whether to disallow players to respawn. Requires a map restart to be taken into account. |
public
array
|
#
getDisableRespawn( )
Get whether players are disallowed to respawn. The struct returned contains two fields CurrentValue and NextValue. |
public
boolean
|
#
setForceShowAllOpponents( integer $forceShowAllOpponents, boolean $multicall = false )
Set whether to override the players preferences and always display all opponents 0=no override, 1=show all, other value=minimum number of opponents. Requires a map restart to be taken into account. |
public
array
|
#
getForceShowAllOpponents( )
Get whether players are forced to show all opponents. The struct returned contains two fields CurrentValue and NextValue. |
public
boolean
|
#
setScriptName( string $scriptName, boolean $multicall = false )
Set a new rules script name for script mode. Only available to Admin. Requires a map restart to be taken into account. |
public
array
|
#
getScriptName( )
Get the current and next rules script name for script mode. The struct returned contains two fields CurrentValue and NextValue. |
public
boolean
|
#
setTimeAttackLimit( integer $timeAttackLimit, boolean $multicall = false )
Set a new time limit for time attack mode. Requires a map restart to be taken into account. |
public
array
|
#
getTimeAttackLimit( )
Get the current and next time limit for time attack mode. The struct returned contains two fields CurrentValue and NextValue. |
public
boolean
|
#
setTimeAttackSynchStartPeriod( integer $timeAttackSynchPeriod, boolean $multicall = false )
Set a new synchronized start period for time attack mode. Requires a map restart to be taken into account. |
public
array
|
#
getTimeAttackSynchStartPeriod( )
Get the current and synchronized start period for time attack mode. The struct returned contains two fields CurrentValue and NextValue. |
public
boolean
|
#
setLapsTimeLimit( integer $lapsTimeLimit, boolean $multicall = false )
Set a new time limit for laps mode. Requires a map restart to be taken into account. |
public
array
|
#
getLapsTimeLimit( )
Get the current and next time limit for laps mode. The struct returned contains two fields CurrentValue and NextValue. |
public
boolean
|
|
public
array
|
|
public
boolean
|
#
setRoundForcedLaps( integer $roundForcedLaps, boolean $multicall = false )
Set a new number of laps for rounds mode 0 = default, use the number of laps from the maps, otherwise forces the number of rounds for multilaps maps. Requires a map restart to be taken into account. |
public
array
|
#
getRoundForcedLaps( )
Get the current and next number of laps for rounds mode. The struct returned contains two fields CurrentValue and NextValue. |
public
boolean
|
#
setRoundPointsLimit( integer $roundPointsLimit, boolean $multicall = false )
Set a new points limit for rounds mode (value set depends on UseNewRulesRound). Requires a map restart to be taken into account. |
public
array
|
#
getRoundPointsLimit( )
Get the current and next points limit for rounds mode (values returned depend on UseNewRulesRound). The struct returned contains two fields CurrentValue and NextValue. |
public
boolean
|
#
setRoundCustomPoints( array $roundCustomPoints, boolean $relaxChecking = false, boolean $multicall = false )
Set the points used for the scores in rounds mode. Points is an array of decreasing integers for the players from the first to last. And you can add an optional boolean to relax the constraint checking on the scores. |
public
array
|
#
getRoundCustomPoints( boolean $multicall = false )
Gets the points used for the scores in rounds mode. |
public
boolean
|
#
setUseNewRulesRound( boolean $useNewRulesRound, boolean $multicall = false )
Set the points used for the scores in rounds mode. Points is an array of decreasing integers for the players from the first to last. And you can add an optional boolean to relax the constraint checking on the scores. |
public
array
|
|
public
boolean
|
#
setTeamPointsLimit( integer $teamPointsLimit, boolean $multicall = false )
Set a new points limit for team mode (value set depends on UseNewRulesTeam). Requires a map restart to be taken into account. |
public
array
|
#
getTeamPointsLimit( )
Get the current and next points limit for team mode (values returned depend on UseNewRulesTeam). The struct returned contains two fields CurrentValue and NextValue. |
public
boolean
|
#
setMaxPointsTeam( integer $maxPointsTeam, boolean $multicall = false )
Set a new number of maximum points per round for team mode. Requires a map restart to be taken into account. |
public
array
|
#
getMaxPointsTeam( )
Get the current and next number of maximum points per round for team mode. The struct returned contains two fields CurrentValue and NextValue. |
public
boolean
|
#
setUseNewRulesTeam( boolean $useNewRulesTeam, boolean $multicall = false )
Set if new rules are used for team mode. Requires a map restart to be taken into account. |
public
array
|
#
getUseNewRulesTeam( )
Get if the new rules are used for team mode (Current and next values). The struct returned contains two fields CurrentValue and NextValue. |
public
boolean
|
#
setCupPointsLimit( integer $pointsLimit, boolean $multicall = false )
Set the points needed for victory in Cup mode. Requires a map restart to be taken into account. |
public
array
|
#
getCupPointsLimit( )
Get the points needed for victory in Cup mode. The struct returned contains two fields CurrentValue and NextValue. |
public
boolean
|
#
setCupRoundsPerMap( integer $roundsPerMap, boolean $multicall = false )
Sets the number of rounds before going to next map in Cup mode. Requires a map restart to be taken into account. |
public
array
|
#
getCupRoundsPerMap( )
Get the number of rounds before going to next map in Cup mode. The struct returned contains two fields CurrentValue and NextValue. |
public
boolean
|
#
setCupWarmUpDuration( integer $warmUpDuration, boolean $multicall = false )
Set whether to enable the automatic warm-up phase in Cup mode. 0 = no, otherwise it's the duration of the phase, expressed in number of rounds. Requires a map restart to be taken into account. |
public
array
|
#
getCupWarmUpDuration( )
Get whether the automatic warm-up phase is enabled in Cup mode. The struct returned contains two fields CurrentValue and NextValue. |
public
boolean
|
#
setCupNbWinners( integer $nbWinners, boolean $multicall = false )
Set the number of winners to determine before the match is considered over. Requires a map restart to be taken into account. |
public
array
|
#
getCupNbWinners( )
Get the number of winners to determine before the match is considered over. The struct returned contains two fields CurrentValue and NextValue. |
public
integer
|
#
getCurrentMapIndex( )
Returns the current map index in the selection, or -1 if the map is no longer in the selection. |
public
integer
|
#
getNextMapIndex( )
Returns the map index in the selection that will be played next (unless the current one is restarted...) |
public
boolean
|
#
setNextMapIndex( integer $nextMapIndex, boolean $multicall = false )
Sets the map index in the selection that will be played next (unless the current one is restarted...) |
public
boolean
|
#
jumpToMapIndex( integer $mapIndex, boolean $multicall = false )
Immediately jumps to the map designated by the index in the selection |
public
boolean
|
#
setTeamInfo( string $teamName1, float $teamColor1, string $team1Country, string $teamName2, float $teamColor2, string $team2Country, boolean $multicall = false )
Set Team names and colors. Only available to Admin. |
public
boolean
|
#
disableHorns( boolean $disable, boolean $multicall = false )
Disable player horns. Only available to Admin. |
public
boolean
|
|
public
|
#
getCurrentMapInfo( )
Returns a struct containing the infos for the current map. The struct contains the following fields : Name, UId, FileName, Author, Environnement, Mood, BronzeTime, SilverTime, GoldTime, AuthorTime, CopperPrice, LapRace, NbLaps and NbCheckpoints. |
public
|
#
getNextMapInfo( )
Returns a struct containing the infos for the next map. The struct contains the following fields : Name, UId, FileName, Author, Environnement, Mood, BronzeTime, SilverTime, GoldTime, AuthorTime, CopperPrice, LapRace, NbLaps and NbCheckpoints. (NbLaps and NbCheckpoints are also present but always set to -1) |
public
|
#
getMapInfo( string $filename )
Returns a struct containing the infos for the map with the specified filename. The struct contains the following fields : Name, UId, FileName, Author, Environnement, Mood, BronzeTime, SilverTime, GoldTime, AuthorTime, CopperPrice, LapRace, NbLaps and NbCheckpoints. (NbLaps and NbCheckpoints are also present but always set to -1) |
public
boolean
|
#
checkMapForCurrentServerParams( string $filename )
Returns a boolean if the map with the specified filename matches the current server settings. |
public
|
#
getMapList( integer $length, integer $offset )
Returns a list of maps among the current selection of the server. This method take two parameters. The first parameter specifies the maximum number of infos to be returned, the second one the starting index in the selection. The list is an array of structures. Each structure contains the following fields : Name, UId, FileName, Environnement, Author, GoldTime and CopperPrice. |
public
boolean
|
|
public
integer
|
#
addMapList( array $filenames, boolean $multicall = false )
Add the list of maps with the specified filename at the end of the current selection. |
public
boolean
|
|
public
integer
|
#
removeMapList( array $filenames, boolean $multicall = false )
Remove the list of maps with the specified filenames from the current selection. The list of maps to remove is an array of strings. |
public
boolean
|
|
public
integer
|
#
insertMapList( array $filenames, mixed $multicall = false )
Insert the list of maps with the specified filenames after the current map. The list of maps to remove is an array of strings. |
public
boolean
|
#
chooseNextMap( string $filename, boolean $multicall = false )
Set as next map the one with the specified filename, if it is present in the selection. |
public
integer
|
#
chooseNextMapList( array $filenames, boolean $multicall = false )
Set as next maps the list of maps with the specified filenames, if they are present in the selection. The list of maps to remove is an array of strings. |
public
integer
|
#
loadMatchSettings( string $filename, mixed $multicall = false )
Set a list of maps defined in the playlist with the specified filename as the current selection of the server, and load the gameinfos from the same file. |
public
integer
|
#
appendPlaylistFromMatchSettings( string $filename, mixed $multicall = false )
Add a list of maps defined in the playlist with the specified filename at the end of the current selection. |
public
integer
|
#
saveMatchSettings( string $filename, boolean $multicall = false )
Save the current selection of map in the playlist with the specified filename, as well as the current gameinfos. |
public
integer
|
#
insertPlaylistFromMatchSettings( string $filename, mixed $multicall = false )
Insert a list of maps defined in the playlist with the specified filename after the current map. |
public
|
#
getPlayerList( integer $length, integer $offset, integer $compatibility = 1 )
Returns the list of players on the server. This method take two parameters. The first parameter specifies the maximum number of infos to be returned, the second one the starting index in the list, an optional 3rd parameter is used for compatibility: struct version (0 = united, 1 = forever, 2 = forever, including the servers). The list is an array of Structures\Player. LadderRanking is 0 when not in official mode, Flags = ForceSpectator(0,1,2) + IsReferee * 10 + IsPodiumReady * 100 + IsUsingStereoscopy * 1000 + IsManagedByAnOtherServer * 10000 + IsServer * 100000 + HasPlayerSlot * 1000000 SpectatorStatus = Spectator + TemporarySpectator * 10 + PureSpectator * 100 + AutoTarget * 1000 + CurrentTargetId * 10000 |
public
|
#
getPlayerInfo( integer $playerLogin, integer $compatibility = 1 )
Returns a object of type Structures\Player containing the infos on the player with the specified login, with an optional parameter for compatibility: struct version (0 = united, 1 = forever). The structure is identical to the ones from GetPlayerList. Forever PlayerInfo struct is: Login, NickName, PlayerId, TeamId, SpectatorStatus, LadderRanking, and Flags. LadderRanking is 0 when not in official mode, Flags = ForceSpectator(0,1,2) + IsReferee * 10 + IsPodiumReady * 100 + IsUsingStereoscopy * 1000 + IsManagedByAnOtherServer * 10000 + IsServer * 100000 + HasPlayerSlot * 1000000 SpectatorStatus = Spectator + TemporarySpectator * 10 + PureSpectator * 100 + AutoTarget * 1000 + CurrentTargetId * 10000 |
public
|
#
getDetailedPlayerInfo( integer $playerLogin )
Returns an object of type Structures\Player containing the infos on the player with the specified login. The structure contains the following fields : Login, NickName, PlayerId, TeamId, IPAddress, DownloadRate, UploadRate, Language, IsSpectator, IsInOfficialMode, a structure named Avatar, an array of structures named Skins, a structure named LadderStats, HoursSinceZoneInscription and OnlineRights (0: nations account, 3: united account). Each structure of the array Skins contains two fields Environnement and a struct PackDesc. Each structure PackDesc, as well as the struct Avatar, contains two fields FileName and Checksum. |
public
|
#
getMainServerPlayerInfo( integer $compatibility = 1 )
Returns an object of Structures\Player type containing the infos on the player with the specified login. The structure contains the following fields : Login, NickName, PlayerId, TeamId, IPAddress, DownloadRate, UploadRate, Language, IsSpectator, IsInOfficialMode, a structure named Avatar, an array of structures named Skins, a structure named LadderStats, HoursSinceZoneInscription and OnlineRights (0: nations account, 3: united account). Each structure of the array Skins contains two fields Environnement and a struct PackDesc. Each structure PackDesc, as well as the struct Avatar, contains two fields FileName and Checksum. |
public
|
#
getCurrentRanking( integer $length, integer $offset )
Returns the current rankings for the race in progress. (in team mode, the scores for the two teams are returned. In other modes, it's the individual players' scores) This method take two parameters. The first parameter specifies the maximum number of infos to be returned, the second one the starting index in the ranking. The ranking returned is a list of Structures\Player. It also contains an array BestCheckpoints that contains the checkpoint times for the best race. |
public
|
#
getCurrentRankingForLogin(
Returns the current ranking for the race in progressof the player with the specified login (or list of comma-separated logins). The ranking returned is a list of structures that contains the following fields : Login, NickName, PlayerId, Rank, BestTime, Score, NbrLapsFinished and LadderScore. It also contains an array BestCheckpoints that contains the checkpoint times for the best race. |
public
integer
|
#
getCurrentWinnerTeam( )
Returns the current winning team for the race in progress. (-1: if not in team mode, or draw match) |
public
boolean
|
#
forceScores( array $scores, boolean $silentMode = false, mixed $multicall = false )
Force the scores of the current game. Only available in rounds and team mode. You have to pass an array of structs {int PlayerId, int Score}. And a boolean SilentMode - if true, the scores are silently updated (only available for SuperAdmin), allowing an external controller to do its custom counting... |
public
boolean
|
#
forcePlayerTeam(
Force the team of the player. Only available in team mode. You have to pass the login and the team number (0 or 1). |
public
boolean
|
#
forceSpectator(
Force the spectating status of the player. You have to pass the login and the spectator mode (0: user selectable, 1: spectator, 2: player). |
public
boolean
|
#
forceSpectatorTarget(
Force spectators to look at a specific player. You have to pass the login of the spectator (or '' for all) and the login of the target (or '' for automatic), and an integer for the camera type to use (-1 = leave unchanged, 0 = replay, 1 = follow, 2 = free). |
public
boolean
|
#
spectatorReleasePlayerSlot(
Pass the login of the spectator. A spectator that once was a player keeps his player slot, so that he can go back to race mode. Calling this function frees this slot for another player to connect. |
public
boolean
|
#
manualFlowControlEnable( boolean $flowControlEnable, boolean $multicall = false )
Enable control of the game flow: the game will wait for the caller to validate state transitions. |
public
boolean
|
|
public
integer
|
#
manualFlowControlIsEnabled( )
Returns whether the manual control of the game flow is enabled. 0 = no, 1 = yes by the xml-rpc client making the call, 2 = yes, by some other xml-rpc client. |
public
string
|
#
manualFlowControlGetCurTransition( )
Returns the transition that is currently blocked, or '' if none. (That's exactly the value last received by the callback.) |
public
string
|
#
checkEndMatchCondition( )
Returns the current match ending condition. Return values are: 'Playing', 'ChangeMap' or 'Finished'. |
public
|
#
getNetworkStats( )
Returns an object Structures\NetworkStats. The structure contains the following fields : Uptime, NbrConnection, MeanConnectionTime, MeanNbrPlayer, RecvNetRate, SendNetRate, TotalReceivingSize, TotalSendingSize and an array of structures named PlayerNetInfos. Each structure of the array PlayerNetInfos is a Structures\Player object contains the following fields : Login, IPAddress, LastTransferTime, DeltaBetweenTwoLastNetState, PacketLossRate. |
public
boolean
|
#
startServerLan( boolean $multicall = false )
Start a server on lan, using the current configuration. |
public
boolean
|
#
startServerInternet( array $multicall = false )
Start a server on internet using the 'Login' and 'Password' specified in the struct passed as parameters. |
public
|
|
public
boolean
|
|
public
string
|
|
public
string
|
|
public
string
|
protected static
|
$instances | array() |
|
protected
|
$xmlrpcClient |
|
#
XML-RPC client instance |