if (!FILTER_ALLOW_TICKETS) { $USER->AddFunctionCall("lz_tracking_remove_overlay_chat();", true); } } if (!$USER->FirstCall) { $USER->Browsers[0]->LoadForward(false); } if (!empty($USER->Browsers[0]->Forward) && (!Server::$Groups[$USER->Browsers[0]->Forward->TargetGroupId]->IsHumanAvailable(true, true) || !empty($USER->Browsers[0]->Forward->TargetSessId) && @Server::$Operators[$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(); } $OVERLAY->DefineTargets(); $OVERLAY->DefineModes(); if (defined("IGNORE_WM") && (empty($USER->Browsers[0]->DesiredChatGroup) || !$OVERLAY->Human)) { $USER->AddFunctionCall("lz_chat_set_talk_to_human(false,false);", false); } $OVERLAY->IsHumanChatAvailable = $OVERLAY->OperatorCount > 0; $OVERLAY->CreateChatTemplate(); $USER->Browsers[0]->ReplaceLoginDetails($USER); if (($USER->Browsers[0]->Status > CHAT_STATUS_OPEN || !empty($USER->Browsers[0]->InitChatWith) || $USER->Browsers[0]->Waiting) && !$USER->Browsers[0]->Closed) { Visitor::$IsActiveOverlayChat = $OVERLAY->IsHumanChatAvailable = !$USER->Browsers[0]->Declined; } else { if ($USER->Browsers[0]->Closed && $USER->Browsers[0]->LastActive > time() - Server::$Configuration->File["timeout_chats"] || !empty($_GET["mi0"])) { Visitor::$IsActiveOverlayChat = !$USER->Browsers[0]->Declined; } } if (!empty($USER->Browsers[0]->DesiredChatGroup) && !(IS_FILTERED && !FILTER_ALLOW_CHATS && !FILTER_ALLOW_TICKETS)) { $changed = Visitor::$PollCount != 1 ? $USER->Browsers[0]->ApplyOverlayInputValues() : false;