user()->getAll(); // TODO: error checking foreach($ret as $r) { RPC_List::$user[] = $r; if (strpos($r->user->modes,"o") !== false && strpos($r->user->modes,"S") == false) RPC_List::$opercount++; elseif (strpos($r->user->modes,"S") !== false) RPC_List::$services_count++; } /* Get the channels list */ $ret = $rpc->channel()->getAll(); foreach($ret as $r) { RPC_List::$channel[] = $r; if ($r->num_users > RPC_List::$channel_pop_count) { RPC_List::$channel_pop_count = $r->num_users; RPC_List::$most_populated_channel = $r->name; } } /* Get the tkl list */ $ret = $rpc->serverban()->getAll(); foreach($ret as $r) RPC_List::$tkl[] = $r; /* Get the spamfilter list */ $ret = $rpc->spamfilter()->getAll(); foreach($ret as $r) RPC_List::$spamfilter[] = $r; foreach ($rpc->nameban()->getAll() as $r) RPC_List::$nameban[] = $r; foreach ($rpc->serverbanexception()->getAll() as $r) RPC_List::$exception[] = $r; foreach ($rpc->server()->getAll() as $r) RPC_List::$server[] = $r; } /** Convert the duration_string */ function rpc_convert_duration_string($str) { $tok = explode("w", $str); $weeks = $tok[0]; $tok = explode("d", $tok[1]); $days = $tok[0]; $tok = explode("h", $tok[1]); $hours = $tok[0]; return "$weeks weeks, $days days and $hours hours"; }