js code:var old_status = ""; function OnEvent_ChatWndCreated() { if (old_status === "") old_status = Messenger.MyStatus; if (Messenger.MyStatus != STATUS_INVISIBLE) Messenger.MyStatus = STATUS_BUSY; } function OnEvent_ChatWndDestroyed() { if (Messenger.CurrentChats.Count === 1) { if (Messenger.MyStatus != STATUS_INVISIBLE) Messenger.MyStatus = old_status; old_status = ""; } }