Ejemplo n.º 1
0
}
if (IS_FILTERED) {
    $USER->Browsers[0]->CloseChat();
    $USER->Browsers[0]->Destroy();
    $USER->AddFunctionCall("lz_tracking_remove_overlay_chat();", true);
}
$USER->Browsers[0]->LoadForward(false);
$USER->LoadChatRequests();
if (!empty($USER->Browsers[0]->Forward) && (!$GROUPS[$USER->Browsers[0]->Forward->TargetGroupId]->IsHumanAvailable(true, true) || !empty($USER->Browsers[0]->Forward->TargetSessId) && @$INTERNAL[$USER->Browsers[0]->Forward->TargetSessId]->UserStatus >= USER_STATUS_OFFLINE)) {
    $USER->Browsers[0]->Forward->Destroy();
    $USER->Browsers[0]->Forward = null;
    $USER->Browsers[0]->ExternalClose();
    $USER->Browsers[0]->Save();
    $USER->Browsers[0]->Load();
}
if (!empty($_GET["tth"]) || $USER->IsInChat(true, $USER->Browsers[0]) || $openChatExternal) {
    define("IGNORE_WM", true);
}
if (defined("IGNORE_WM") && !empty($USER->Browsers[0]->DesiredChatPartner) && $INTERNAL[$USER->Browsers[0]->DesiredChatPartner]->IsBot) {
    $USER->Browsers[0]->DesiredChatPartner = "";
}
if (!empty($USER->Browsers[1]->ChatRequest) && $USER->Browsers[1]->ChatRequest->Closed && !$USER->Browsers[1]->ChatRequest->Accepted && @$INTERNAL[$USER->Browsers[1]->ChatRequest->SenderSystemId]->UserStatus < USER_STATUS_OFFLINE && $INTERNAL[$USER->Browsers[1]->ChatRequest->SenderSystemId]->IsExternal($GROUPS, null, array($USER->Browsers[1]->ChatRequest->SenderGroupId), true)) {
    $USER->Browsers[0]->DesiredChatPartner = $USER->Browsers[1]->ChatRequest->SenderSystemId;
    $USER->Browsers[0]->DesiredChatGroup = $USER->Browsers[1]->ChatRequest->SenderGroupId;
    $OPERATOR_COUNT = 1;
} else {
    if (!(!empty($USER->Browsers[0]->Forward) && !empty($USER->Browsers[0]->DesiredChatGroup))) {
        if (!empty($_GET[GET_EXTERN_INTERN_USER_ID])) {
            $USER->Browsers[0]->DesiredChatPartner = Operator::GetSystemId(base64UrlDecode(getParam(GET_EXTERN_INTERN_USER_ID)));
        }
        if (!empty($USER->Browsers[0]->InitChatWith)) {