missed one file

This commit is contained in:
kremsy
2013-11-09 10:45:29 +01:00
parent e23d25bcd2
commit 0bad97e119
27 changed files with 50 additions and 2360 deletions

View File

@ -1,9 +1,9 @@
<?php
namespace iControl;
namespace mControl;
/**
* iControl Chatlog Plugin
* mControl Chatlog Plugin
*
* @author steeffeen
*/
@ -16,7 +16,7 @@ class Plugin_Chatlog {
/**
* Private properties
*/
private $iControl = null;
private $mControl = null;
private $config = null;
@ -25,8 +25,8 @@ class Plugin_Chatlog {
/**
* Constuct chatlog plugin
*/
public function __construct($iControl) {
$this->iControl = $iControl;
public function __construct($mControl) {
$this->mControl = $mControl;
// Load config
$this->config = Tools::loadConfig('chatlog.plugin.xml');
@ -51,7 +51,7 @@ class Plugin_Chatlog {
// File name
$fileName = (string) $this->config->filename;
$this->settings->fileName = ICONTROL . '/' . $fileName;
$this->settings->fileName = mControl . '/' . $fileName;
// log_server_messages
$log_server_messages = $this->config->xpath('log_server_messages');
@ -77,7 +77,7 @@ class Plugin_Chatlog {
* @param string $login
*/
private function logText($text, $login = null) {
$message = date(iControl::DATE) . '>> ' . ($login ? $login . ': ' : '') . $text . PHP_EOL;
$message = date(mControl::DATE) . '>> ' . ($login ? $login . ': ' : '') . $text . PHP_EOL;
file_put_contents($this->settings->fileName, $message, FILE_APPEND);
}
}

View File

@ -1,9 +1,9 @@
<?php
namespace iControl;
namespace mControl;
/**
* iControl Karma Plugin
* mControl Karma Plugin
*
* @author : steeffeen
*/
@ -18,7 +18,7 @@ class Plugin_Karma {
/**
* Private properties
*/
private $iControl = null;
private $mControl = null;
private $config = null;
@ -27,10 +27,10 @@ class Plugin_Karma {
/**
* Construct plugin
*
* @param object $iControl
* @param object $mControl
*/
public function __construct($iControl) {
$this->iControl = $iControl;
public function __construct($mControl) {
$this->mControl = $mControl;
// Load config
$this->config = Tools::loadConfig('karma.plugin.xml');
@ -72,7 +72,7 @@ class Plugin_Karma {
}
/**
* Handle OnInit iControl callback
* Handle OnInit mControl callback
*
* @param array $callback
*/
@ -82,7 +82,7 @@ class Plugin_Karma {
}
/**
* Handle iControl BeginMap callback
* Handle mControl BeginMap callback
*
* @param array $callback
*/

View File

@ -1,9 +1,9 @@
<?php
namespace iControl;
namespace mControl;
/**
* iControl Obstacle Plugin
* mControl Obstacle Plugin
*
* @author steeffeen
*/
@ -17,15 +17,15 @@ class Plugin_Obstacle extends Plugin {
/**
* Private properties
*/
private $iControl = null;
private $mControl = null;
private $config = null;
/**
* Constuct obstacle plugin
*/
public function __construct($iControl) {
$this->iControl = $iControl;
public function __construct($mControl) {
$this->mControl = $mControl;
// Load config
$this->config = Tools::loadConfig('obstacle.plugin.xml');

View File

@ -1,37 +0,0 @@
<?php
namespace iControl;
/**
* Abstract iControl plugin class
*/
abstract class Plugin_Name {
/**
* Constants
*/
const VERSION = '0.1';
/**
* Private properties
*/
private $iControl = null;
/**
* Construct plugin
*
* @param object $iControl
*/
public function __construct($iControl) {
$this->iControl = $iControl;
error_log('Pugin v' . self::VERSION . ' ready!');
}
/**
* Perform actions during each loop
*/
public function loop() {
}
}
?>

View File

@ -1,6 +1,6 @@
<?php
namespace iControl;
namespace mControl;
// TODO: show mix of best and next records (depending on own one)
// TODO: enable keep-alive
@ -11,7 +11,7 @@ namespace iControl;
// TODO: threaded requests
/**
* iControl Records Plugin
* mControl Records Plugin
*
* @author steeffeen
*/
@ -37,7 +37,7 @@ class Plugin_Records {
/**
* Private properties
*/
private $iControl = null;
private $mControl = null;
private $settings = null;
@ -58,8 +58,8 @@ class Plugin_Records {
/**
* Constuct plugin
*/
public function __construct($iControl) {
$this->iControl = $iControl;
public function __construct($mControl) {
$this->mControl = $mControl;
// Load config
$this->config = Tools::loadConfig('records.plugin.xml');
@ -123,7 +123,7 @@ class Plugin_Records {
}
/**
* Handle iControl init
* Handle mControl init
*/
public function handleOnInit($callback = null) {
// Let manialinks update
@ -255,8 +255,8 @@ class Plugin_Records {
$serverVersion = $this->iControl->server->getVersion();
$serverData['ServerVersion'] = $serverVersion['Version'];
$serverData['ServerBuild'] = $serverVersion['Build'];
$serverData['Tool'] = 'iControl';
$serverData['Version'] = iControl::VERSION;
$serverData['Tool'] = 'mControl';
$serverData['Version'] = mControl::VERSION;
$this->dedimaniaData['serverData'] = $serverData;
}
@ -267,7 +267,7 @@ class Plugin_Records {
$header .= 'Accept-Encoding: gzip;' . PHP_EOL;
$header .= 'Content-Type: text/xml; charset=utf-8;' . PHP_EOL;
$header .= 'Keep-Alive: 300;' . PHP_EOL;
$header .= 'User-Agent: iControl v' . iControl::VERSION . ';' . PHP_EOL;
$header .= 'User-Agent: mControl v' . mControl::VERSION . ';' . PHP_EOL;
$this->dedimaniaData['header'] = $header;
}

View File

@ -1,6 +1,6 @@
<?php
namespace iControl;
namespace mControl;
// TODO: Jump message "now playing stadium"
// TODO: put inactive server in idle (keeping same map)
@ -9,7 +9,7 @@ namespace iControl;
// TODO: max players setting
/**
* iControl United Plugin
* mControl United Plugin
*
* @author steeffeen
*/
@ -23,7 +23,7 @@ class Plugin_United {
/**
* Private properties
*/
private $iControl = null;
private $mControl = null;
private $config = null;
@ -46,8 +46,8 @@ class Plugin_United {
/**
* Constuct plugin
*/
public function __construct($iControl) {
$this->iControl = $iControl;
public function __construct($mControl) {
$this->mControl = $mControl;
// Load config
$this->config = Tools::loadConfig('united.plugin.xml');
@ -78,7 +78,7 @@ class Plugin_United {
}
/**
* Handle iControl OnInit callback
* Handle mControl OnInit callback
*
* @param array $callback
*/
@ -303,7 +303,7 @@ class Plugin_United {
}
// Build manialink url
$manialink = 'icontrol?favorite';
$manialink = 'mControl?favorite';
foreach ($serverLogins as $serverLogin) {
$manialink .= '&' . $serverLogin;
}
@ -478,9 +478,9 @@ class Plugin_United {
}
// Set api version
if (!$client->query('SetApiVersion', iControl::API_VERSION)) {
if (!$client->query('SetApiVersion', mControl::API_VERSION)) {
trigger_error(
"Couldn't set API version '" . iControl::API_VERSION . "'! This might cause problems. " .
"Couldn't set API version '" . mControl::API_VERSION . "'! This might cause problems. " .
$this->iControl->getClientErrorText($client));
}