コード例 #1
0
ファイル: core.php プロジェクト: Exus1/Ts3-Multibot-Engine
        } else {
            print green . "INFO:" . resetColor . $lang['function_list_creator']['load_success'] . "\n";
        }
        closedir($dh);
    } else {
        die(red . "CRITICAL ERROR:" . resetColor . $lang['function_list_creator']['open_folder_error']);
    }
} else {
    die(red . "CRITICAL ERROR:" . resetColor . $lang['function_list_creator']['open_folder_error']);
}
//**************************************************************************************
//*********************************** Commands Mode ************************************
//**************************************************************************************
if ($start_options['startmode'] == "commands") {
    require $paths['files']['commands-core'];
    $multibotObject = new commandsCore("commands");
    $multibot_config = $multibotObject->getConfig("multibot");
    $general_config = $multibotObject->getConfig("general");
    $tsAdmin = $multibotObject->getTsAdmin();
    $instance_list = array();
    $functionCount = 0;
    foreach ($multibot_config as $function_name => $function_vars) {
        if (isset($function_vars['general_config']['enable'])) {
            if (!empty($function_vars['general_config']['enable']) && $function_vars['general_config']['enable'] == true) {
                if (isset($functions_list[$function_name])) {
                    $functionCount++;
                } else {
                    $multibotObject->addError($lang['commands_mode']['function_file_doesnt_exist'] . " " . $function_name);
                    unset($multibot_config[$function_name]);
                }
            }
コード例 #2
0
ファイル: commands-core.php プロジェクト: MEXXIO/ExusMultibot
                    $dataset[1] .= '=' . $dataset[$i];
                }
                $output[unEscapeText($dataset[0])] = unEscapeText($dataset[1]);
            } else {
                if (count($dataset) == 1) {
                    $output[unEscapeText($dataset[0])] = '';
                } else {
                    $output[unEscapeText($dataset[0])] = unEscapeText($dataset[1]);
                }
            }
        }
        return $output;
    }
}
// Tworzy obiekt commandsCore
$commands = new commandsCore();
// Wczytuje język
$lang = $commands->getLang();
// Wczytuje konfigurację commandsCore oraz multibota
$config = $commands->getConfig();
$multibotCFG = $commands->getMultibotConfig();
// type:
// dbid
// uid
function checkUserIsOnline($type, $id)
{
    global $commands;
    $tsAdmin = $commands->tsAdmin;
    if ($type == "uid") {
        $status = $tsAdmin->clientGetIds($id);
        if (!empty($status['data'][0]['clid'])) {