Ejemplo n.º 1
0
 protected function init()
 {
     new \ManiaLive\Features\Tick\Ticker();
     $config = \ManiaLive\DedicatedApi\Config::getInstance();
     $this->connection = Connection::factory($config->host, $config->port, $config->timeout, $config->user, $config->password);
     $this->connection->enableCallbacks(true);
     \ManiaLive\Data\Storage::getInstance();
     \ManiaLive\Features\ChatCommand\Interpreter::getInstance();
     \ManiaLive\Features\EchoHandler::getInstance();
     \ManiaLive\Gui\GuiHandler::getInstance();
     \ManiaLive\PluginHandler\PluginHandler::getInstance();
     \ManiaLive\Threading\ThreadHandler::getInstance();
     Dispatcher::dispatch(new Event(Event::ON_INIT));
 }
Ejemplo n.º 2
0
 /**
  * This will unregister all chat commands that have been
  * created using the plugins method registerChatCommand.
  */
 public final function unregisterAllChatCommands()
 {
     while ($command = array_pop($this->chatCommands)) {
         Interpreter::getInstance()->unregister($command);
     }
 }