• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

Terminate current chat gracefully?

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
3 posts • Page 1 of 1

Postby roschler » Wed Oct 25, 2006 1:53 am

Hello,

I have set up my script that launches phpFreeChat to check a flag. This flag tells the script whether or not I want the chat room to be active. If not, then the launch script puts up a "be back later" message.

That takes care of new people coming in to the chat room. What I need now is a good way to tell people that have the chat room already loaded that the chat room has "closed". I'm guessing I could modify the refresh Ajax call to check for a "chat room closed" return from the server side, which I would have to add myself, but I'm trying to avoid making modifications that will be hard to integrate into newer versions of the phpFreeChat code base.

What's the easiest and least destructive way I can tell the client side code to quit the chat room from the server side, without creating an "Invalid XML response" error? I think a cool feature for the future would be a settable server side check that would allow phpFreeChat chatroom administrators to shut the chat room on and off.

Of course, if this ability already exists, just tell how to do it. :)

Thanks.
roschler
Member
 
Posts: 23
Joined: Thu Oct 19, 2006 6:44 pm
Top

Postby phpfreechat » Wed Oct 25, 2006 8:54 am

It allready exists a parameter use to lock the whole chat.
This parameter is:
$params['islocked'] = true;
$params['lockurl'] = "http://www.phpfreechat.net";
When you setup this parameter server side, it will just redirect all the users to the lockurl page.

Feel free to improve this parameter in order to lock only some specified rooms. If the code is well written I will surrely integrate you contribution to the official source code.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby roschler » Wed Oct 25, 2006 2:02 pm

Kerphi,

Ok thanks. I think the first thing I'll do is create a command that only the administrator can execute, to lock the chat from the client side. Perhaps "/lock".
roschler
Member
 
Posts: 23
Joined: Thu Oct 19, 2006 6:44 pm
Top


Post a reply
3 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 2 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub