|
OTAdmin protocol client. OTAdmin protocol client. Located in /classes/OTS_Admin.php [line 32] Author(s):
Information Tags:
|
| COMMAND_BAN_MANAGER | Not supported in current OTAdmin imlpementation. |
| COMMAND_BROADCAST | Broadcast message. |
| COMMAND_CLOSE_SERVER | Closes server. |
| COMMAND_GETHOUSE | Not supported in current OTAdmin imlpementation. |
| COMMAND_GETONLINE | Not supported in current OTAdmin imlpementation. |
| COMMAND_KICK | Not supported in current OTAdmin imlpementation. |
| COMMAND_OPEN_SERVER | Opens server for players. |
| COMMAND_PAY_HOUSES | Pays all rented shouses. |
| COMMAND_PLAYER_INFO | Not supported in current OTAdmin imlpementation. |
| COMMAND_RELOAD_SCRIPTS | Not supported in current OTAdmin imlpementation. |
| COMMAND_SAVE_SERVER | Calls server save. |
| COMMAND_SERVER_INFO | Not supported in current OTAdmin imlpementation. |
| COMMAND_SHUTDOWN_SERVER | Shutdowns the server. |
| ENCRYPTION_RSA1024XTEA | Server uses XTEA encryption, XTEA key is being sent in 1024bit RSA encrypted packet. |
| REQUEST_COMMAND | OTAdmin commnd. |
| REQUEST_ENCRYPTION | Encryption packet. |
| REQUEST_KEY_EXCHANGE | RSA key exchange. |
| REQUEST_LOGIN | User login. |
| REQUEST_PING | Ping. |
| REQUIRE_ENCRYPTION | Server requires encryption. |
| REQUIRE_LOGIN | Server requires login. |
| RESPOND_COMMAND_FAILED | Command failed. |
| RESPOND_COMMAND_OK | Command success. |
| RESPOND_ENCRYPTION_FAILED | Encryption initialization failed. |
| RESPOND_ENCRYPTION_OK | Encryption initialization success. |
| RESPOND_ERROR | Error. |
| RESPOND_HELLO | Hello respond. |
| RESPOND_KEY_EXCHANGE_FAILED | Keys exchange failed. |
| RESPOND_KEY_EXCHANGE_OK | Keys exchange success. |
| RESPOND_LOGIN_FAILED | Login incorrect. |
| RESPOND_LOGIN_OK | Login success. |
| RESPOND_MESSAGE | Message. |
| RESPOND_PING_OK | Ping success. |
| static void | __set_state() | Magic PHP5 method. |
| void | broadcast() | Sends COMMAND_BROADCAST command with given parameter. |
| void | close() | Sends COMMAND_CLOSE_SERVER command. |
| void | kick() | Sends COMMAND_KICK command with given parameter. |
| void | login() | Logs into server. |
| void | open() | Sends COMMAND_OPEN_SERVER command. |
| void | payHouses() | Sends COMMAND_PAY_HOUSES command. |
| int | ping() | Ping command. |
| bool | requiresEncryption() | Checks if protocol requires encryption. |
| bool | requiresLogin() | Checks if protocol requires login. |
| OTS_Admin | __construct() | Creates new connection to OTServ administration backend. |
| void | __destruct() | Closes connection. |
| void | save() | Sends COMMAND_SAVE_SERVER command. |
| OTS_Buffer | send() | Sends OTAdmin packet. |
| void | shutdown() | Sends COMMAND_SHUTDOWN_SERVER command. |
| bool | usesRSA1024XTEA() | Checks if protocol requires XTEA encryption with RSA-encrypted key. |
| void | __clone() | Magic PHP5 method. |
| void | __get() | Magic PHP5 method. |
| void | __set() | Magic PHP5 method. |
| array | __sleep() | Magic PHP5 method. |
| void | __wakeup() | Magic PHP5 method. |
|
Magic PHP5 method.
Magic PHP5 method. Allows object importing from var_export().
Parameters:| array | $properties: | List of object properties. |
| Access: | public |
| Version: | 0.1.2 |
| Throws: | E_OTS_ErrorCode When receive failed respond or unexpected message. |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of packet stream. |
| Since: | 0.1.2 |
|
Sends COMMAND_BROADCAST command with given parameter.
Sends COMMAND_BROADCAST command with given parameter. Sends broadcast message to all players.
Parameters:| string | $message: | Broadcast to be sent. |
| Access: | public |
| Version: | 0.1.2 |
| Throws: | E_OTS_ErrorCode If failure respond received. |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of packet stream. |
| Since: | 0.1.2 |
|
Sends COMMAND_CLOSE_SERVER command.
Sends COMMAND_CLOSE_SERVER command. Closes server. This command closes server for connections to enable maintenance but doesn't shut it down.
| Access: | public |
| Version: | 0.1.2 |
| Throws: | E_OTS_ErrorCode If failure respond received. |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of packet stream. |
| Since: | 0.1.2 |
|
Sends COMMAND_KICK command with given parameter.
Sends COMMAND_KICK command with given parameter. Kicks given player from server.
Parameters:| string | $name: | Name of player to be kicked. |
| Access: | public |
| Version: | 0.1.4 |
| Version: | 0.1.2 |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of packet stream. |
| Throws: | E_OTS_ErrorCode If failure respond received. |
| Since: | 0.1.2 |
| Since: | 0.1.4 |
|
Logs into server.
Logs into server. Call this method if after connection is established login required flag is set.
Parameters:| string | $password: | Admin password. |
| Access: | public |
| Version: | 0.1.2 |
| Throws: | E_OTS_ErrorCode When receive failed respond or unexpected message. |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of packet stream. |
| Since: | 0.1.2 |
|
Sends COMMAND_OPEN_SERVER command.
Sends COMMAND_OPEN_SERVER command. Opens server. This command enables server for connections.
| Access: | public |
| Version: | 0.1.6 |
| Version: | 0.1.2 |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of packet stream. |
| Throws: | E_OTS_ErrorCode If failure respond received. |
| Since: | 0.1.2 |
| Since: | 0.1.6 |
|
Sends COMMAND_PAY_HOUSES command.
Sends COMMAND_PAY_HOUSES command. Takes fees for all rented houses.
| Access: | public |
| Version: | 0.1.2 |
| Throws: | E_OTS_ErrorCode If failure respond received. |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of packet stream. |
| Since: | 0.1.2 |
|
Ping command.
Ping command. Note: This methods calculates ping time based on OTS_Admin::send() sub-call. This means ping time will be time used for entire seding operation including packet encryption, packing, unpacking and decryption.
| Return: | Ping time. |
| Access: | public |
| Version: | 0.1.2 |
| Throws: | E_OTS_ErrorCode When receive failed respond or unexpected message. |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of packet stream. |
| Since: | 0.1.2 |
|
Checks if protocol requires encryption.
Checks if protocol requires encryption.
| Return: | True if protocol requires encryption. |
| Access: | public |
| Version: | 0.1.2 |
| Since: | 0.1.2 |
|
Checks if protocol requires login.
Checks if protocol requires login.
| Return: | True if protocol requires user login. |
| Access: | public |
| Version: | 0.1.2 |
| Since: | 0.1.2 |
|
Creates new connection to OTServ administration backend.
Creates new connection to OTServ administration backend. This method automaticly handles RSA and XTEA encryption if such method is required by server including keys negotiations.
After connecting you should check if server requires login.
Parameters:| string | $host: | Target server. |
| int | $port: | Port (7171 by default). |
| Access: | public |
| Version: | 0.1.2 |
| Throws: | E_OTS_ErrorCode When receive failed respond or unexpected message. |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of packet stream. |
| Since: | 0.1.2 |
|
Closes connection.
Closes connection.
| Access: | public |
| Version: | 0.1.2 |
| Since: | 0.1.2 |
|
Sends COMMAND_SAVE_SERVER command.
Sends COMMAND_SAVE_SERVER command. Proceeds server save.
| Access: | public |
| Version: | 0.1.6 |
| Version: | 0.1.2 |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of packet stream. |
| Throws: | E_OTS_ErrorCode If failure respond received. |
| Since: | 0.1.2 |
| Since: | 0.1.6 |
|
Sends OTAdmin packet.
Sends OTAdmin packet.
Parameters:| OTS_Buffer | $message: | Packet to be sent. |
| Return: | Server respond. |
| Access: | public |
| Version: | 0.1.2 |
| Throws: | E_OTS_ErrorCode When receive RESPOND_ERROR message. |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of packet stream. |
| Since: | 0.1.2 |
|
Sends COMMAND_SHUTDOWN_SERVER command.
Sends COMMAND_SHUTDOWN_SERVER command. Shutdowns server. This command closes server thread.
| Access: | public |
| Version: | 0.1.2 |
| Throws: | E_OTS_ErrorCode If failure respond received. |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of packet stream. |
| Since: | 0.1.2 |
|
Checks if protocol requires XTEA encryption with RSA-encrypted key.
Checks if protocol requires XTEA encryption with RSA-encrypted key.
| Return: | True if protocol requires that encryption. |
| Access: | public |
| Version: | 0.1.2 |
| Since: | 0.1.2 |
|
Magic PHP5 method.
Magic PHP5 method. Creates new socket connection to server.
| Access: | public |
| Version: | 0.1.2 |
| Throws: | E_OTS_ErrorCode When receive failed respond or unexpected message. |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of packet stream. |
| Since: | 0.1.2 |
|
Magic PHP5 method.
Magic PHP5 method.
Parameters:| string | $name: | Property name. |
| mixed | $value: | Property value. |
| Access: | public |
| Version: | 0.1.3 |
| Version: | 0.1.2 |
| Throws: | E_OTS_ErrorCode When receive failed respond or unexpected message. |
| Throws: | OutOfBoundsException For non-supported properties. |
| Since: | 0.1.2 |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of packet stream. |
| Since: | 0.1.3 |
|
Magic PHP5 method.
Magic PHP5 method.
Parameters:| string | $name: | Property name. |
| mixed | $value: | Property value. |
| Access: | public |
| Version: | 0.1.4 |
| Version: | 0.1.2 |
| Throws: | E_OTS_ErrorCode When receive failed respond or unexpected message. |
| Throws: | OutOfBoundsException For non-supported properties. |
| Since: | 0.1.2 |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of packet stream. |
| Since: | 0.1.3 |
|
Magic PHP5 method.
Magic PHP5 method. Allows object serialisation.
| Return: | List of properties that should be saved. |
| Access: | public |
| Version: | 0.1.2 |
| Since: | 0.1.2 |
|
Magic PHP5 method.
Magic PHP5 method. Allows object unserialisation.
| Access: | public |
| Version: | 0.1.2 |
| Throws: | E_OTS_ErrorCode When receive failed respond or unexpected message. |
| Throws: | E_OTS_OutOfBuffer When there is read attemp after end of packet stream. |
| Since: | 0.1.2 |
Not supported in current OTAdmin imlpementation.
Not supported in current OTAdmin imlpementation.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
Broadcast message.
Broadcast message.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
Closes server.
Closes server.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
Not supported in current OTAdmin imlpementation.
Not supported in current OTAdmin imlpementation.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
Not supported in current OTAdmin imlpementation.
Not supported in current OTAdmin imlpementation.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
Not supported in current OTAdmin imlpementation.
Not supported in current OTAdmin imlpementation.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
Opens server for players.
Opens server for players.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
Pays all rented shouses.
Pays all rented shouses.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
Not supported in current OTAdmin imlpementation.
Not supported in current OTAdmin imlpementation.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
Not supported in current OTAdmin imlpementation.
Not supported in current OTAdmin imlpementation.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
Calls server save.
Calls server save.
Information Tags:| Version: | 0.1.6 |
| Version: | 0.1.2 |
| Since: | 0.1.2 |
| Since: | 0.1.6 |
Not supported in current OTAdmin imlpementation.
Not supported in current OTAdmin imlpementation.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
Shutdowns the server.
Shutdowns the server.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
Server uses XTEA encryption, XTEA key is being sent in 1024bit RSA encrypted packet.
Server uses XTEA encryption, XTEA key is being sent in 1024bit RSA encrypted packet.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
OTAdmin commnd.
OTAdmin commnd.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
Encryption packet.
Encryption packet.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
RSA key exchange.
RSA key exchange.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
User login.
User login.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
Server requires encryption.
Server requires encryption.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
Server requires login.
Server requires login.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
Command failed.
Command failed.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
Command success.
Command success.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
Encryption initialization failed.
Encryption initialization failed.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
Encryption initialization success.
Encryption initialization success.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
Hello respond.
Hello respond.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
Keys exchange failed.
Keys exchange failed.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
Keys exchange success.
Keys exchange success.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
Login incorrect.
Login incorrect.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
Login success.
Login success.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
Message.
Message.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |
Ping success.
Ping success.
Information Tags:| Version: | 0.1.2 |
| Since: | 0.1.2 |