added new communication methods

This commit is contained in:
kremsy
2015-06-23 21:20:44 +02:00
parent 6c1d0658fe
commit f9fd1ad90b
4 changed files with 180 additions and 52 deletions

View File

@ -272,6 +272,7 @@ class CommunicationManager implements CallbackListener {
//Encode, Encrypt and Send Response
$data = json_encode($data);
$data = openssl_encrypt($data, self::ENCRYPTION_METHOD, $password, OPENSSL_RAW_DATA, self::ENCRYPTION_IV);
$connection->write(strlen($data) . "\n" . $data);

View File

@ -16,6 +16,42 @@ interface CommunicationMethods {
*/
const RESTART_MANIA_CONTROL = "ManiaControl.Restart";
/** Gets Mania Control PlayerList
* no Parameters
*/
const GET_PLAYER_LIST = "PlayerManager.GetPlayerList";
/** Warns a Player
* Required Params
* - login
*/
const WARN_PLAYER = "PlayerActions.WarnPlayer";
/** Mutes a Player
* Required Params
* - login
*/
const MUTE_PLAYER = "PlayerActions.MutePlayer";
/** UnMutes a Player
* Required Params
* - login
*/
const UNMUTE_PLAYER = "PlayerActions.UnMutePlayer";
/** UnMutes a Player
* Required Params
* - login
* Optional Params
* - message
*/
const KICK_PLAYER = "PlayerActions.KickPlayer";
//TODO implement
const FORCE_PLAYER_TO_SPEC = "PlayerActions.ForcePlayerToSpec";
//TODO implement
const FORCE_PLAYER_TO_PLAY = "PlayerActions.ForcePlayerToPlay";
/** Returns the last 200 lines of the chat (inclusive player logins and nicknames)
* No Params
*/