More and more cnages to make the site functional

This commit is contained in:
genuineparts 2025-06-18 15:02:56 +02:00
parent 6c44a79a72
commit 16ef8fdf6c
17 changed files with 493 additions and 199 deletions

View file

@ -75,23 +75,11 @@ function get_user_list() {
}
function get_user_room($username) {
global $config;
/* Open URL to userlist
if (!$fh = @fopen("http://localhost.localdomain:".$config['SOCK_PORT']."/info/?", "r"))
return false;
// Read data and close
while(!feof($fh))
$content .= fread($fh, 1024);
fclose($fh); */
$content = $ccache->get('roomdata');
global $config;
$content = get_user_list();
$content = trim($content);
$content = explode("\n", $content);
// Create userlist array
// Format of array:
// $userlist[$room_name]['s'] = $room_state
// $userlist[$room_name]['u'][$nick] = $color
foreach($content as $line) {
$data = explode("|", $line);
list($nick, $color) = explode(",", $data[1]);