Added commanddescriptions to plugins.
This commit is contained in:
parent
d2021d689e
commit
9653658f06
@ -51,25 +51,23 @@ class ChatMessagePlugin implements CommandListener, Plugin {
|
|||||||
public function load(ManiaControl $maniaControl) {
|
public function load(ManiaControl $maniaControl) {
|
||||||
$this->maniaControl = $maniaControl;
|
$this->maniaControl = $maniaControl;
|
||||||
|
|
||||||
$this->maniaControl->commandManager->registerCommandListener('me', $this, 'chat_me');
|
$this->maniaControl->commandManager->registerCommandListener('me', $this, 'chat_me', false, 'Can be used to express your feelings/ideas.');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('hi', $this, 'chat_hi');
|
$this->maniaControl->commandManager->registerCommandListener('hi', $this, 'chat_hi', false, 'Writes an hello message to the chat.');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('bye', $this, 'chat_bye');
|
$this->maniaControl->commandManager->registerCommandListener(array('bb', 'bye'), $this, 'chat_bye', false, 'Writes a goodbye message to the chat.');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('bb', $this, 'chat_bye');
|
$this->maniaControl->commandManager->registerCommandListener('thx', $this, 'chat_thx', false, 'Writes a thanks message to the chat.');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('thx', $this, 'chat_thx');
|
$this->maniaControl->commandManager->registerCommandListener('gg', $this, 'chat_gg', false, 'Writes a good game message to the chat.');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('gg', $this, 'chat_gg');
|
$this->maniaControl->commandManager->registerCommandListener('gl', $this, 'chat_gl', false, 'Writes a good luck message to the chat.');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('gl', $this, 'chat_gl');
|
$this->maniaControl->commandManager->registerCommandListener('hf', $this, 'chat_hf', false, 'Writes an have fun message to the chat.');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('hf', $this, 'chat_hf');
|
$this->maniaControl->commandManager->registerCommandListener('glhf', $this, 'chat_glhf', false, 'Writes a good luck, have fun message to the chat.');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('glhf', $this, 'chat_glhf');
|
$this->maniaControl->commandManager->registerCommandListener('ns', $this, 'chat_ns', false, 'Writes a nice shot message to the chat.');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('ns', $this, 'chat_ns');
|
$this->maniaControl->commandManager->registerCommandListener('n1', $this, 'chat_n1', false, 'Writes a nice one message to the chat.');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('n1', $this, 'chat_n1');
|
$this->maniaControl->commandManager->registerCommandListener('lol', $this, 'chat_lol', false, 'Writes a lol message to the chat.');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('lol', $this, 'chat_lol');
|
$this->maniaControl->commandManager->registerCommandListener('lool', $this, 'chat_lool', false, 'Writes a lool message to the chat.');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('lool', $this, 'chat_lool');
|
$this->maniaControl->commandManager->registerCommandListener('brb', $this, 'chat_brb', false, 'Writes a be right back message to the chat.');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('brb', $this, 'chat_brb');
|
$this->maniaControl->commandManager->registerCommandListener('bgm', $this, 'chat_bgm', false, 'Writes a bad game for me message to the chat.');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('bgm', $this, 'chat_bgm');
|
$this->maniaControl->commandManager->registerCommandListener('afk', $this, 'chat_afk', false, 'Writes an away from keyboard message to the chat.');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('afk', $this, 'chat_afk');
|
$this->maniaControl->commandManager->registerCommandListener(array('bm', 'bootme'), $this, 'chat_bootme', false, 'Gets you away from this server quickly!');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('bootme', $this, 'chat_bootme');
|
$this->maniaControl->commandManager->registerCommandListener(array('rq', 'ragequit'), $this, 'chat_ragequit', false, 'Gets you away from this server in rage!');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('ragequit', $this, 'chat_ragequit');
|
|
||||||
$this->maniaControl->commandManager->registerCommandListener('rq', $this, 'chat_ragequit');
|
|
||||||
//TODO block commandlistener for muted people
|
//TODO block commandlistener for muted people
|
||||||
$this->maniaControl->settingManager->initSetting($this, self::SETTING_AFK_FORCE_SPEC, true);
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_AFK_FORCE_SPEC, true);
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
|
|||||||
public function load(ManiaControl $maniaControl) {
|
public function load(ManiaControl $maniaControl) {
|
||||||
$this->maniaControl = $maniaControl;
|
$this->maniaControl = $maniaControl;
|
||||||
|
|
||||||
$this->maniaControl->commandManager->registerCommandListener('vote', $this, 'chat_vote');
|
$this->maniaControl->commandManager->registerCommandListener('vote', $this, 'chat_vote', false, 'Votes for the current vote.');
|
||||||
$this->maniaControl->timerManager->registerTimerListening($this, 'handle1Second', 1000);
|
$this->maniaControl->timerManager->registerTimerListening($this, 'handle1Second', 1000);
|
||||||
$this->maniaControl->callbackManager->registerCallbackListener(ServerCommands::CB_VOTE_CANCELED, $this, 'handleVoteCanceled');
|
$this->maniaControl->callbackManager->registerCallbackListener(ServerCommands::CB_VOTE_CANCELED, $this, 'handleVoteCanceled');
|
||||||
$this->maniaControl->manialinkManager->registerManialinkPageAnswerListener(self::ACTION_POSITIVE_VOTE, $this, 'handlePositiveVote');
|
$this->maniaControl->manialinkManager->registerManialinkPageAnswerListener(self::ACTION_POSITIVE_VOTE, $this, 'handlePositiveVote');
|
||||||
|
@ -111,7 +111,7 @@ class Dedimania implements CallbackListener, CommandListener, TimerListener, Plu
|
|||||||
$this->maniaControl->timerManager->registerTimerListening($this, 'updateEverySecond', 1000);
|
$this->maniaControl->timerManager->registerTimerListening($this, 'updateEverySecond', 1000);
|
||||||
$this->maniaControl->timerManager->registerTimerListening($this, 'handleEveryMinute', 1000 * 60);
|
$this->maniaControl->timerManager->registerTimerListening($this, 'handleEveryMinute', 1000 * 60);
|
||||||
$this->maniaControl->timerManager->registerTimerListening($this, 'updatePlayerList', 1000 * 60 * 3);
|
$this->maniaControl->timerManager->registerTimerListening($this, 'updatePlayerList', 1000 * 60 * 3);
|
||||||
$this->maniaControl->commandManager->registerCommandListener('dedirecs', $this, 'showDediRecordsList');
|
$this->maniaControl->commandManager->registerCommandListener(array('dedirecs', 'dedirecords'), $this, 'showDediRecordsList', false, 'Shows a list of Dedimania records of the current map.');
|
||||||
|
|
||||||
// Open session
|
// Open session
|
||||||
$serverInfo = $this->maniaControl->server->getInfo();
|
$serverInfo = $this->maniaControl->server->getInfo();
|
||||||
|
@ -72,9 +72,9 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
|
|||||||
$this->maniaControl = $maniaControl;
|
$this->maniaControl = $maniaControl;
|
||||||
|
|
||||||
// Register for commands
|
// Register for commands
|
||||||
$this->maniaControl->commandManager->registerCommandListener('donate', $this, 'command_Donate');
|
$this->maniaControl->commandManager->registerCommandListener('donate', $this, 'command_Donate', false, 'Donate some planets to the server.');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('pay', $this, 'command_Pay', true);
|
$this->maniaControl->commandManager->registerCommandListener('pay', $this, 'command_Pay', true, 'Pays planets from the server to a player.');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('planets', $this, 'command_GetPlanets', true);
|
$this->maniaControl->commandManager->registerCommandListener('planets', $this, 'command_GetPlanets', true, 'Checks the planets-balance of the server.');
|
||||||
|
|
||||||
// Register for callbacks
|
// Register for callbacks
|
||||||
$this->maniaControl->callbackManager->registerCallbackListener(PlayerManager::CB_PLAYERCONNECT, $this, 'handlePlayerConnect');
|
$this->maniaControl->callbackManager->registerCallbackListener(PlayerManager::CB_PLAYERCONNECT, $this, 'handlePlayerConnect');
|
||||||
|
@ -103,8 +103,8 @@ class LocalRecordsPlugin implements CallbackListener, CommandListener, TimerList
|
|||||||
$this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_TM_PLAYERCHECKPOINT, $this, 'handlePlayerCheckpoint');
|
$this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_TM_PLAYERCHECKPOINT, $this, 'handlePlayerCheckpoint');
|
||||||
$this->maniaControl->callbackManager->registerCallbackListener(SettingManager::CB_SETTINGS_CHANGED, $this, 'handleSettingsChanged');
|
$this->maniaControl->callbackManager->registerCallbackListener(SettingManager::CB_SETTINGS_CHANGED, $this, 'handleSettingsChanged');
|
||||||
$this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_MP_PLAYERMANIALINKPAGEANSWER, $this, 'handleManialinkPageAnswer');
|
$this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_MP_PLAYERMANIALINKPAGEANSWER, $this, 'handleManialinkPageAnswer');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('records', $this, 'showRecordsList');
|
$this->maniaControl->commandManager->registerCommandListener(array('recs', 'records'), $this, 'showRecordsList', false, 'Shows a list of Local Records on the current map.');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('delrec', $this, 'deleteRecord', true);
|
$this->maniaControl->commandManager->registerCommandListener('delrec', $this, 'deleteRecord', true, 'Removes a record from the database.');
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -98,8 +98,8 @@ class ServerRankingPlugin implements Plugin, CallbackListener, CommandListener {
|
|||||||
$this->maniaControl->callbackManager->registerCallbackListener(Callbacks::ENDMAP, $this, 'handleEndMap');
|
$this->maniaControl->callbackManager->registerCallbackListener(Callbacks::ENDMAP, $this, 'handleEndMap');
|
||||||
|
|
||||||
//Register CommandListener
|
//Register CommandListener
|
||||||
$this->maniaControl->commandManager->registerCommandListener('rank', $this, 'command_showRank', false);
|
$this->maniaControl->commandManager->registerCommandListener('rank', $this, 'command_showRank', false, 'Shows your current serverrank.');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('nextrank', $this, 'command_nextRank', false);
|
$this->maniaControl->commandManager->registerCommandListener('nextrank', $this, 'command_nextRank', false, 'Shows the person in front of you in the serverranking.');
|
||||||
|
|
||||||
$this->resetRanks(); //TODO only update records count
|
$this->resetRanks(); //TODO only update records count
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user