Open a file : function.php
Search for : systemReplace
Replace it with this :
function systemReplace($text){
global $lang;
$text = str_replace('%bcquit%', $lang['leave_message'], $text);
$text = str_replace('%bcjoin%', $lang['join_message'], $text);
$text = str_replace('%bcclear%', $lang['clear_message'], $text);
$text = str_replace('%spam%', $lang['spam_content'], $text);
$text = str_replace('%bcname%', $lang['name_message'], $text);
$text = str_replace('%bckick%', $lang['kick_message'], $text);
$text = str_replace('%bcban%', $lang['ban_message'], $text);
$text = str_replace('%bcmute%', $lang['mute_message'], $text);
$text = str_replace('%bcblock%', $lang['block_message'], $text);
return $text;
}
And add this :
function leaveRoomUser(){
global $data, $lang;
if(useLogs(1) && isVisible($data) && $data['user_roomid'] != 0 && $data['last_action'] > time() - 30){
$content = str_replace('%user%', systemNameFilter($data), $lang['quit_room']);
systemPostChat($data['user_roomid'], $content, array('type'=> 'system__leave'));
}
}
Then open the language file and add this :
$lang['leave_message'] = 'has left the room';
$lang['quit_room'] = '%user% %bcquit%';
Then open the file: /system/action/action_room.php
Search for : leaveRoom
Replace it with this :
function leaveRoom(){
global $mysqli, $data;
$mysqli->query("UPDATE boom_users SET user_roomid = '0', user_move = '" . time() . "' WHERE user_id = '{$data['user_id']}'");
redisUpdateUser($data['user_id']);
leaveRoomUser();
return 1;
}
Within the same file, search for the : joinRoom
Replace it with this :
function joinRoom(){
global $mysqli, $data;
$target = escape($_POST['room'], true);
$page = escape($_POST['cp']);
if(myRoom($target)){
return;
}
$room = myRoomDetails($target);
if(empty($room)){
return boomCode(1);
}
if($room['room_blocked'] > time()){
return boomCode(99);
}
if(mustVerify()){
return boomCode(99);
}
$data['user_role'] = $room['room_ranking'];
if(boomAllow($room['access'])){
$mysqli->query("UPDATE boom_users SET user_roomid = '$target', user_move = '" . time() . "', last_action = '" . time() . "', user_role = '{$room['room_ranking']}', room_mute = '{$room['room_muted']}' WHERE user_id = '{$data['user_id']}'");
$mysqli->query("UPDATE boom_rooms SET room_action = '" . time() . "' WHERE room_id = '$target'");
leaveRoomUser();//
joinRoomMessage($target);
redisUpdateUser($data['user_id']);
redisUpdateRoom($target);
if(insideChat($page)){
return boomCode(10, array('data'=> createRoomData($room)));
}
else {
return boomCode(10);
}
}
else {
return boomCode(2);
}
}
Open the : system/action/logout.php file
Search for : logout_from_system
Replace it with this :
if(isset($_POST['logout_from_system'])){
clearUserSession();
$mysqli->query("UPDATE `boom_users` SET `user_roomid` = '0', user_move = '" . time() . "', user_role = '0' WHERE `user_id` = '{$data["user_id"]}'");
if(isGuest($data)){
softGuestDelete($data);
}
redisUpdateUser($data['user_id']);
leaveRoomUser();
echo 1;
die();
}