• 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

Cannot force nicknames in beta 10

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

Post a reply
6 posts • Page 1 of 1

Postby lackattack » Fri Apr 13, 2007 5:33 pm

When I set the nick and set frozen_nick to true, the first person to enter pfc has no problem. However, when more people enter for some reason pfc attempts to change their nicks to the 1st person's nick. So everyone gets "Choosen nickname is not allowed" and cannot enter the chat utill that 1st person leaves or I rehash. I downgraded to beta 9 which does not have this problem.

Here are my parameters:
Code: Select all
require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params["serverid"] = md5(__FILE__);
$params["theme"] = "phpbb2";
$params["title"] = "Live Chat";
$params['channels'] = array('Callouts','Social');
$params["nick"] = $_GET['u'];
$params["frozen_nick"] = true;
$params["debug"] = true;
$params["max_nick_len"] = 16;
$params["refresh_delay"] = 2000; // 2000ms = 2s
$params["height"] = "350px";

Here is the debug when the 1st person (lackattack) enters the chat:
Code: Select all
handleResponse: whois2-ok-[object Object]
handleResponse: whois2-ok-[object Object]
handleResponse: nick-notchanged-lackattack
handleResponse: whois2-ok-[object Object]
handleResponse: whois2-ok-[object Object]
handleResponse: whois2-ok-[object Object]
sendRequest: /whois2 "df39a82b4d4c7275a06fd6926d391f40"
handleResponse: who2-ok-[object Object]
sendRequest: /whois2 "df39a82b4d4c7275a06fd6926d391f40"
handleResponse: who2-ok-[object Object]
sendRequest: /nick "lackattack"
handleResponse: connect-ok-lackattack
handleResponse: join-ok-dffc2f4093494c4d7eb8c62b259374b4,Social
handleResponse: join2-ok-ab5ed3f55f98a3424d807693eab1b59c,Callouts
handleResponse: nick-connected-lackattack
sendRequest: /connect lackattack

Here is the debug when the 2nd person (rabin) enters the chat:
Code: Select all
handleResponse: nick-notallowed-lackattack
handleResponse: connect-ko-rabin
handleResponse: nick-notallowed-lackattack
handleResponse: nick-notallowed-lackattack
sendRequest: /connect rabin
Last edited by lackattack on Fri Apr 13, 2007 5:35 pm, edited 1 time in total.
lackattack
New member
 
Posts: 8
Joined: Thu Apr 05, 2007 5:52 am
Location: Montreal, Quebec
  • Website
Top

Postby phpfreechat » Sat Jun 30, 2007 7:54 pm

lackattack, sorry for the delay.

I think I found why you have problems.
This is due to the fact nicknames are assign by url ( $_GET['u'] ). To fix this problem you should have to fix the "server_script_url" parameter to the basic url without the "u" parameter :

$params["server_script_url"] = "./index.php";

Keep me informed if it works.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby lackattack » Thu Jul 05, 2007 6:16 am

Yes, that works!

Thanks so much Stéphane. I am now using phpFreeChat (beta 11) on my live site and so far, so good.
lackattack
New member
 
Posts: 8
Joined: Thu Apr 05, 2007 5:52 am
Location: Montreal, Quebec
  • Website
Top

Postby mkoch » Fri Jul 06, 2007 11:24 am

I had the same problem, this fixed it as well.

But now I have a new problem getting:
Missing parameter (/join {channelname})

$params["nick"] = $_GET['nick'];
$params["server_script_url"] = "index.php";
$params["channels"] = array($_GET['channel']);
$params["frozen_channels"] = array($_GET['channel']);
$params["frozen_nick"] = true;
$params["title"] = "ONM chat";
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params["data_private_path"] = "/dana/data/onm/phpfreechat_data";
$params["btn_sh_whosonline"] = false;
$params["btn_sh_smileys"] = false;
$params["showsmileys"] = false;
$params["max_msg"] = 0;
$params["height"] = "190px";
$chat = new phpFreeChat( $params );

This worked on the version prior to beta10.
mkoch
Member
 
Posts: 77
Joined: Tue Feb 21, 2006 5:08 pm
Location: Brussels/Denmark
  • Website
Top

Postby lackattack » Fri Jul 06, 2007 2:51 pm

Instead of passing your settings with $_GET, try putting them in $_COOKIE. Then you won't need to set server_script_url.
lackattack
New member
 
Posts: 8
Joined: Thu Apr 05, 2007 5:52 am
Location: Montreal, Quebec
  • Website
Top

Postby mkoch » Mon Jul 09, 2007 11:01 pm

Still a bug.
mkoch
Member
 
Posts: 77
Joined: Tue Feb 21, 2006 5:08 pm
Location: Brussels/Denmark
  • Website
Top


Post a reply
6 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 15 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