Skip to content

Commit

Permalink
First commit of eBot
Browse files Browse the repository at this point in the history
  • Loading branch information
Pardons Julien committed Oct 21, 2012
1 parent 867e733 commit 78e0df9
Show file tree
Hide file tree
Showing 168 changed files with 17,047 additions and 0 deletions.
69 changes: 69 additions & 0 deletions bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?php
/**
* eBot - A bot for match management for CS:GO
* @license http://creativecommons.org/licenses/by/3.0/ Creative Commons 3.0
* @author Julien Pardons <[email protected]>
* @version 3.0
* @date 21/10/2012
*/

$check["php"] = (function_exists('version_compare') && version_compare(phpversion(), '5.3.1', '>='));
$check["php5.4"] = (function_exists('version_compare') && version_compare(phpversion(), '5.4', '>='));
$check["mcrypt"] = extension_loaded('mcrypt');
$check["mysql"] = extension_loaded('mysql');
$check["spl"] = extension_loaded('spl');
$check["sockets"] = extension_loaded("sockets");

echo "
____ _
| _ \ | |
___| |_) | ___ | |_
/ _ \ _ < / _ \| __|
| __/ |_) | (_) | |_
\___|____/ \___/ \__|
" . PHP_EOL;

echo 'PHP Compatibility Test' . PHP_EOL;
echo '-----------------------------------------------------' . PHP_EOL;
echo '| PHP 5.3.1 or newer -> required -> ' . ($check["php"] ? ('[ Yes ] ' . phpversion()) : '[ No ]') . PHP_EOL;
echo '| Standard PHP Library -> required -> ' . ($check["spl"] ? '[ Yes ]' : '[ No ]') . PHP_EOL;
echo '| MySQL -> required -> ' . ($check["mysql"] ? '[ Yes ]' : '[ No ]') . PHP_EOL;
echo '| Sockets -> required -> ' . ($check["sockets"] ? '[ Yes ]' : '[ No ]') . PHP_EOL;
echo '| MCrypt -> required -> ' . ($check["mcrypt"] ? '[ Yes ]' : '[ No ]') . PHP_EOL;
echo '-----------------------------------------------------' . PHP_EOL;

if (!$check["php5.4"]) {
echo "| We recommand to use PHP5.4 to get better performance !" . PHP_EOL;
echo '-----------------------------------------------------' . PHP_EOL;
}

unset($check["php5.4"]);

if (in_array(false, $check)) {
echo "| Your php configuration missed, please make sure that you have all feature !" . PHP_EOL;
echo '-----------------------------------------------------' . PHP_EOL;
exit();
}

// better checking if timezone is set
if (!ini_get('date.timezone')) {
$timezone = @date_default_timezone_get();
echo '| Timezone is not set in php.ini. Please edit it and change/set "date.timezone" appropriately. '
. 'Setting to default: \'' . $timezone . '\'' . PHP_EOL;
echo '-----------------------------------------------------' . PHP_EOL;
date_default_timezone_set($timezone);
}

include __DIR__ . DIRECTORY_SEPARATOR . 'libraries' . DIRECTORY_SEPARATOR . 'steamCondenser' . DIRECTORY_SEPARATOR . 'steam-condenser.php';

// enable error reporting
ini_set('display_errors', 1);
error_reporting(E_ALL);
gc_enable();

define('EBOT_DIRECTORY', __DIR__);

require_once __DIR__ . DIRECTORY_SEPARATOR . 'libraries' . DIRECTORY_SEPARATOR . 'autoload.php';

\eBot\Application\Application::getInstance()->run();
?>
26 changes: 26 additions & 0 deletions config/config.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
; eBot - A bot for match management for CS:GO
; @license http://creativecommons.org/licenses/by/3.0/ Creative Commons 3.0
; @author Julien Pardons <[email protected]>
; @version 3.0
; @date 21/10/2012

[BDD]
MYSQL_IP = "127.0.0.1"
MYSQL_PORT = "3306"
MYSQL_USER = "ebotv3"
MYSQL_PASS = "ebotv3"
MYSQL_BASE = "ebotv3"

[Config]
BOT_IP = "192.168.1.1"
BOT_PORT = 12360
MANAGE_PLAYER = 1
DELAY_BUSY_SERVER = 90
NB_MAX_MATCHS = 0

[Security]
CRYPT_KEY = "rkI0aVS2QM14f53bozB4oEqm" ; Please, generate a new key !

[Message]
PUB[] = "#lightgreenWelcome on eBot 3.0"
PUB[] = "#lightgreenOne more thing, you can see your stats on the eBot panel"
11 changes: 11 additions & 0 deletions config/logger.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
; eBot - A bot for match management for CS:GO
; @license http://creativecommons.org/licenses/by/3.0/ Creative Commons 3.0
; @author Julien Pardons <[email protected]>
; @version 3.0
; @date 21/10/2012


[Log]
LOG = true
LOG_PATH = "logs/log_match/"
LOG_PATH_ADMIN = "logs/log_match_admin/"
22 changes: 22 additions & 0 deletions config/messages.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
; eBot - A bot for match management for CS:GO
; @license http://creativecommons.org/licenses/by/3.0/ Creative Commons 3.0
; @author Julien Pardons <[email protected]>
; @version 3.0
; @date 21/10/2012

; Don't touch to this file, configuration for messages
[CSGO]
message[] = "\eBot\Message\CSGO\BombDefusing"
message[] = "\eBot\Message\CSGO\BombPlanting"
message[] = "\eBot\Message\CSGO\ChangeMap"
message[] = "\eBot\Message\CSGO\ChangeName"
message[] = "\eBot\Message\CSGO\Connected"
message[] = "\eBot\Message\CSGO\Disconnected"
message[] = "\eBot\Message\CSGO\EnteredTheGame"
message[] = "\eBot\Message\CSGO\JoinTeam"
message[] = "\eBot\Message\CSGO\Kill"
message[] = "\eBot\Message\CSGO\RoundRestart"
message[] = "\eBot\Message\CSGO\RoundScored"
message[] = "\eBot\Message\CSGO\RoundStart"
message[] = "\eBot\Message\CSGO\Say"
message[] = "\eBot\Message\CSGO\SayTeam"
8 changes: 8 additions & 0 deletions config/plugins.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
; eBot - A bot for match management for CS:GO
; @license http://creativecommons.org/licenses/by/3.0/ Creative Commons 3.0
; @author Julien Pardons <[email protected]>
; @version 3.0
; @date 21/10/2012

;[\eBot\Plugins\Official\PluginMatchScoreNotifier]
;url=http://elan.esport-tools.net/api/update/{MATCH_ID}
Loading

0 comments on commit 78e0df9

Please sign in to comment.