If you add this before the closing brace of the foreach statement, it should show when people join and leave, which is probably handy?
php code: else if ( strpos($this,"logged in") )
{
$time = "[" . substr($thing, 11, 5) . "]";
$person = preg_match( '/(?<=\[INFO\] )\S+/' , $thing );
$chats[] = $time.' <i>Joined:</i> <b>'.htmlspecialchars($person).'</b>';
}
else if ( strpos($thing,"lost connection") )
{
$time = "[" . substr($thing, 11, 5) . "]";
$person = preg_match( '/(?<=\[INFO\] )\S+/' , $thing );
$reason = substr(strrchr($thing, '.'), 1);
$chats[] = $time.' <i>Disconnected:</i> <b>'.htmlspecialchars($person).'</b> ('.$reason.')';
} |