diff --git a/core/user_settings/user_dashboard.php b/core/user_settings/user_dashboard.php index 6b49af586c..1ce65b73eb 100644 --- a/core/user_settings/user_dashboard.php +++ b/core/user_settings/user_dashboard.php @@ -1092,12 +1092,10 @@ //channel count if ($fp) { - $tmp = event_socket_request($fp, 'api show channels'); - $tmp = explode("\n", $tmp); - $tmp = preg_replace('!\s+!', ' ', trim($tmp[3])); - $tmp = explode(' ', $tmp); - $tmp = $tmp[0]; - $channels = (is_numeric($tmp)) ? $tmp : 0; + $tmp = event_socket_request($fp, 'api status'); + $matches = Array(); + preg_match("/(\d+)\s+session\(s\)\s+\-\speak/", $tmp, $matches); + $channels = $matches[1] ? $matches[1] : 0; $hud[$n]['html'] .= "