0) $text[] = $days.' days'; if($hours > 0) $text[] = $hours.' hours'; if($mins > 0) $text[] = $mins.' mins'; if($secs > 0) $text[] = $secs.' secs'; return COLOUR.'03'.implode(' ',$text).COLOUR; return COLOUR.'03'.format_time($timediff).COLOUR; } function command_stats($params = '') { global $Bot; $this->format_time($extdata[1],time()); $Head = $Bot[$this->Index]; // For ease. $uptime = trim(exec('cut -d. -f1 /proc/uptime')); $process_count = trim(exec('ps aux | grep -v grep | wc -l')); $text = str_replace(array('%C','%B'),array(COLOUR,BOLD),'%C14(S%C15tats%C14) %C7%B'.chr(187).'%C%B '.trim(exec('hostname -f')).' %C7%B'.chr(171).'%B%C %C14(U%C15ptime%C14) %C7%B'.chr(187).'%C%B '.format_time($uptime).' %C7%B'.chr(171).'%B%C %C14(P%C15rocess Count%C14) %C7%B'.chr(187).'%C%B '.$process_count.' %C7%B'.chr(171).'%B%C %C14(M%C15essages%C14) %C7%B'.chr(187).'%C%B '.$Head->Socket->LastBuffer.' sent/'.$Head->Socket->TotalReceived.' received %C7%B'.chr(171).'%B%C'); $Head->Out->PrivMsg($Head->In->Channel,$text); } }