Jump to content


Turning Off Live Chat While Active Chats Stay Active


  • You cannot reply to this topic
No replies to this topic

#1 Guest_TracerX_*

  • Guests

Posted 04 June 2010 - 01:43 AM

I have tested this solution and it appears to work though I'd like some feedback to know if I might have overlooked something. I tried simply editing the operator load function in object.global.users.inc.php but found that setting the operator to USER_STATUS_OFFLINE would cause active chats to drop.

Edited Livezilla Verson: 3.1.8.6
Mod Description: Changes the livezilla image to the offline image and makes all groups appear to be offline after a certain time. Allows chats started before the cutoff time to be continued while not allowing for additional chats after that time.

In the code I'm including, I've set the code to force offline before 8:30am ((int) date("Hi") < 830), after 5:30pm ((int) date("Hi") > 1730), and on weekends( date("w") == 0 || date("w") == 6).

Changes:
functions.global.inc.php line 438 added the following
	if(date("w") == 0 || date("w") == 6 || (int) date("Hi") > 1730 || (int) date("Hi") < 830)
    return 0;


objects.external.inc.php line 91 added the following
					if(date("w") != 0 && date("w") != 6 && (int) date("Hi") <= 1730 && (int) date("Hi") >= 830)

Edit: Should have paid closer attention to my use of date(). Had "W" where I should've had "w" in a few places. Fixed now.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users