• 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

[FIX] parameter frozen_nick doesn\'t seem to work

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

Post a reply
14 posts • Page 1 of 1

Postby cactux » Mon Feb 27, 2006 8:49 pm

Hello,

I put this in my conf :
$params["frozen_nick"] = true;

But I can still change my nickname with the command :
/nick another-nick

Is there something else to parameter to avoid the possibility to change the nicks?

Thanks
Yann
cactux
Member
 
Posts: 16
Joined: Wed Feb 15, 2006 11:08 pm
Location: France
  • Website
Top

Postby pixelpeter » Mon Feb 27, 2006 9:26 pm

I just discovered the same problem :-(
pixelpeter
New member
 
Posts: 7
Joined: Sun Feb 26, 2006 6:10 pm
Top

Postby pixelpeter » Mon Feb 27, 2006 9:52 pm

I integrated the chat into my forum thats why I have given nicknames.
Because of this I could do this simple (but awfull) workaround.
This will only work if you wont do anything with your nickname(s)

In the file "src/phpfreechat.class.php" go to line 395 and replace the content of the function with an comment.
After this workaraound changing the nick by typing "/nick myNewNickName" won't work any longer

The function looks like this now

Code: Select all
  function Cmd_nick(&$xml_reponse, $clientid, $newnick)
  {
   //disabled
  }
pixelpeter
New member
 
Posts: 7
Joined: Sun Feb 26, 2006 6:10 pm
Top

Postby phpfreechat » Mon Feb 27, 2006 11:09 pm

It's right frozen_nick is not completly implemented, I wait for the moderation to implement a more generic way to allow/forbid commands.

However, the pixelpeter workeround should work.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby softwareNerd » Wed Mar 01, 2006 2:16 pm

On our Chat, users will often add "-AFK" to their nick, to show that they are "Away From Keyboard". So, for example, someone with a nick of "Tom", might change it to "Tom-AFK" and then (when he returns) change it back to "Tom".

In our environment, we would like to use a frozen nick --- because people chatting are all members of another forum, and we like to use a standard nick and prevent impersonation. However, the "AFK" is useful.

So, with that introduction, here is my suggestion:

When you implement frozen nick, you should also implement something like and "/away" command that simply marks the user's name in some way. It could be a simple toggle.
softwareNerd
Member
 
Posts: 17
Joined: Thu Feb 23, 2006 4:00 pm
Top

Postby phpfreechat » Wed Mar 01, 2006 2:31 pm

The /away command is into the roadmap. It's right this will be very useful.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby Bernhard J. M. Grün » Wed Mar 01, 2006 2:32 pm

With 0.8 an additional parameter like /away would be easy to implement. I'll see what I can do.

Bernhard
Bernhard J. M. Grün
Member
 
Posts: 13
Joined: Thu Feb 23, 2006 3:42 pm
Location: Püttlingen, Saarland, Germany
  • Website
  • ICQ
Top

Postby maskiri » Wed Mar 08, 2006 12:53 pm

pixelpeter's workaround seems to prevent any new users from joining the chat .it stops the whole nickname creation function.
maskiri
New member
 
Posts: 2
Joined: Wed Mar 08, 2006 12:35 pm
Location: Harare
Top

Postby Bernhard J. M. Grün » Wed Mar 08, 2006 5:50 pm

Yes that's correct. :-(
And I did not find an easy way to implement frozen_nick into the Nick-Command-Class. Sorry.

Bernhard
Bernhard J. M. Grün
Member
 
Posts: 13
Joined: Thu Feb 23, 2006 3:42 pm
Location: Püttlingen, Saarland, Germany
  • Website
  • ICQ
Top

Postby Munk » Sat Apr 29, 2006 1:31 am

Hmmn.. I just ran into this also. however, there is no line 395 in the "src/phpfreechat.class.php" in my version (0.9.3)

also no function "function Cmd_nick" anywhere i've found.

so, i'm stuck for now until 1.0 is released, i guess (:

however, as I'm setting the nick via the "username" value in the user's session (set by my CMS), i suppose I could read that value directly into the nick change code so that anytime someone tries to use the /nick command, it will fire successfully (so the initial nick setting on chat launch works the way it's supposed to) but whatever nick the user inputs would just be rewritten with the $_SESSION[username] value.. hmmn.

I'll see if i can dig around in the code and make that work. :D

[edit]
ok, i figured this out. Because i'm forcing the nick to the $_SESSION[username] value (I want my users to chat under thier CMS usernames) I can force any nick change to that value (as stated above).

to do this, I edited line 30 of "src/pfccommand_nick.class.php"

like so:
// $newnick = phpFreeChat::FilterNickname($newnick);
$newnick = $_SESSION[username];

(i got rid of the "filternickname" function because i already force my users to pure alphanumeric usernames)

basically, this allows the initial nick setting on chat launch to work correctly, and then anytime someone tries the /nick command, nothing happens because whatever input they type gets replaced with the nick they already have (:
[/edit]
Last edited by Munk on Sat Apr 29, 2006 1:44 am, edited 1 time in total.
Munk
New member
 
Posts: 4
Joined: Sat Apr 29, 2006 12:43 am
Top

Postby phpfreechat » Sat Apr 29, 2006 8:41 am

Thank you for sharing this workaround Munk. :)
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby Munk » Sat Apr 29, 2006 8:40 pm

Heh, thank *you* for creating a very nice implementation of an AJAX chat that is pretty easy to integrate into existing systems and customize. Excellent work!

I can't wait till you release 1.0 - the roadmap looks very promising (:
Munk
New member
 
Posts: 4
Joined: Sat Apr 29, 2006 12:43 am
Top

Postby _00_ » Thu May 04, 2006 4:00 am

I use a kind of patch,:

I added on "src/pfccommand_nick.class.php"
a new line 46:
$newnickid=$oldnickid;
with this the nick doesn't change with command, only change the text of the input-button, for solve this I made this input-button as hidden (on /themes/default/templates/chat.html.tpl.php)
and now it don't permit changes of the nick.

Ricardo
_00_
New member
 
Posts: 2
Joined: Thu May 04, 2006 3:47 am
Top

Postby motosdeagua.es » Thu May 18, 2006 8:46 am

...
Last edited by motosdeagua.es on Thu May 18, 2006 8:47 am, edited 1 time in total.
My challenge is make working to phpfreechat with postnuke!
Moving phpfreechat to Spain!
- www.motosdeagua.es -
motosdeagua.es
Member
 
Posts: 35
Joined: Tue May 02, 2006 12:24 pm
Location: SPAIN
  • Website
Top


Post a reply
14 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 13 guests

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