예제 #1
0
파일: Dog_Init.php 프로젝트: sinfocol/gwf3
 public static function isBlocking()
 {
     return (int) Dog_Conf_Bot::getConf('blocking', 0);
 }
예제 #2
0
파일: super_La.php 프로젝트: sinfocol/gwf3
$argc = $plugin->argc();
$argv = $plugin->argv();
unset($user);
if ($argc === 2) {
    if (false === ($user = Dog_User::getByLongName($argv[1]))) {
        return $plugin->rply('user');
    }
    $server = $user->getServer();
    $argc = 1;
}
if ($argc === 1) {
    if (!isset($user)) {
        $user = Dog::getUser();
    }
    if (!$user->isRegistered()) {
        return $plugin->rply('not_regged', array($user->displayName(), $server->displayName()));
    }
    if ($argv[0] === Dog_Conf_Bot::getConf('superword', 'gizmore')) {
        Dog_PrivServer::grantAll($server, $user);
        Dog_PrivChannel::grantAllToAll($server, $user);
        $plugin->rply('super', array($user->displayName(), $server->displayName()));
    } elseif ($argv[0] === $server->getConf('ircoppass')) {
        Dog_PrivServer::grantIrcop($server, $user);
        Dog_PrivChannel::grantAllToAll($server, $user, Dog_IRCPriv::allBitsButOwner());
        $plugin->rply('super', array($user->displayName(), $server->displayName()));
    } else {
        $plugin->rply('wrong');
    }
} else {
    $plugin->showHelp();
}
예제 #3
0
파일: confb_Xb.php 프로젝트: sinfocol/gwf3
    $out = '';
    foreach ($vars as $var) {
        $var instanceof Dog_Var;
        $out .= sprintf(', %s', $var->getName());
    }
    return $plugin->rply('avail', array(substr($out, 2)));
} elseif ($argc === 1) {
    if (false === ($var = Dog_Var::getVar($vars, $argv[0]))) {
        return Dog::rply('err_unk_var');
    }
    $varname = $var->getName();
    $vartype = $var->displayType();
    $vardeft = $var->getDefault();
    $curvalu = Dog_Conf_Bot::getConf($varname, $vardeft);
    return $plugin->rply('show', array($varname, $vartype, $vardeft, $curvalu));
} elseif ($argc === 2) {
    if (false === ($var = Dog_Var::getVar($vars, $argv[0]))) {
        return Dog::rply('err_unk_var');
    }
    $varname = $var->getName();
    $vartype = $var->displayType();
    $vardeft = $var->getDefault();
    $curvalu = Dog_Conf_Bot::getConf($varname, $vardeft);
    if (!Dog_Var::isValid($var->getType(), $argv[1])) {
        return $plugin->rply('invalid', array($varname, $vartype));
    }
    Dog_Conf_Bot::setConf($varname, $argv[1]);
    return $plugin->rply('set', array($varname, $argv[1]));
} else {
    $plugin->showHelp();
}