Ejemplo n.º 1
0
function do_favorite($event, $source, $target, $text)
{
    global $favorite_row;
    static $cache = array();
    array_push($cache, array("event" => $event, "text" => "@{$source} => @{$target}: {$text}"));
    if (count($cache) > FAVORITE_ROWS) {
        array_shift($cache);
    }
    cursave();
    curpos($favorite_row, 1);
    foreach ($cache as $info) {
        curclearline();
        if ($info["event"] == "favorite") {
            echocursetfont("YELLOW");
            echo $info["text"] . "\n";
            echocurfontreset();
        } else {
            if ($info["event"] == "unfavorite") {
                echocursetfont("RED");
                echo $info["text"] . "\n";
                echocurfontreset();
            }
        }
    }
    currestore();
}
Ejemplo n.º 2
0
function curhome()
{
    curpos(1, 1);
}