Exemple #1
0
function onComplete(&$ev, $l, $w)
{
    if ($l == "") {
        oneCompletion($ev->retval, "detect", $w);
    } else {
        if ($l == "help") {
            oneCompletion($ev->retval, "detect", $w);
        } else {
            if ($l == "detect") {
                oneCompletion($ev->retval, "on", $w);
                oneCompletion($ev->retval, "off", $w);
                $ev->params["complete"] = "channels";
            }
        }
    }
}
Exemple #2
0
function onComplete(&$ev, $l, $w)
{
    global $hosts;
    if ($l == "") {
        oneCompletion($ev->retval, "banbrutes", $w);
    } else {
        if ($l == "help") {
            oneCompletion($ev->retval, "banbrutes", $w);
        } else {
            if ($l == "banbrutes") {
                oneCompletion($ev->retval, "list", $w);
                oneCompletion($ev->retval, "unban", $w);
                oneCompletion($ev->retval, "debug", $w);
                oneCompletion($ev->retval, "failures", $w);
            } else {
                if ($l == "banbrutes unban") {
                    foreach ($hosts as $addr => &$host) {
                        if ($host->banned()) {
                            oneCompletion($ev->retval, $addr, $w);
                        }
                    }
                } else {
                    if ($l == "banbrutes debug") {
                        oneCompletion($ev->retval, "on", $w);
                        oneCompletion($ev->retval, "off", $w);
                    }
                }
            }
        }
    }
}