• 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

Custom commands ignore nick -- please help!

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

Post a reply
5 posts • Page 1 of 1

Postby fabian » Fri Mar 28, 2008 6:30 pm

If you check out the command customization example in the faq:

http://www.phpfreechat.net/src/1.x/demo ... ommand.php


Try entering this chat, change your nick, (e.g. /nick NewGuest),
and then enter the custom command (e.g. /roll 1d6).

Note that the chat lists a random new nick as now having sent that command, rather than you.

This is a bug, surely? Can anyone help me to fix this, please?


Thank you


Fabian


PS. Great chat otherwise, I really love it!
fabian
Member
 
Posts: 20
Joined: Fri Mar 28, 2008 11:39 am
Location: Berlin, Germany
Top

Postby fabian » Thu Apr 10, 2008 2:04 pm

Hello? Anyone? Could anyone at least try this and tell me whether they have the same problem? Please? Or is there a simple trick to get this going and display the correct nickname? Does anyone know?
fabian
Member
 
Posts: 20
Joined: Fri Mar 28, 2008 11:39 am
Location: Berlin, Germany
Top

Postby OldWolf » Fri Apr 11, 2008 2:54 am

Bug confirmed.
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Postby fabian » Fri Apr 11, 2008 7:48 am

Thank you. :cool:
Last edited by fabian on Fri Apr 11, 2008 7:49 am, edited 1 time in total.
fabian
Member
 
Posts: 20
Joined: Fri Mar 28, 2008 11:39 am
Location: Berlin, Germany
Top

Postby fabian » Fri Apr 11, 2008 9:11 pm

I fixed this bug now: The appropriate code in the custom class has a general error that does not correctly report the nick; I presume this was older version code. The code in the custom class example should instead, for the main page, read initially:
Code: Select all
function run(&$xml_reponse, $p)
  {
    $clientid    = $p["clientid"];
    $param       = $p["param"];
    $sender      = $p["sender"];
    $recipient   = $p["recipient"];
    $recipientid = $p["recipientid"];
   
    $c =& pfcGlobalConfig::Instance();
    $ct   =& pfcContainer::Instance();
    $u  =& pfcUserConfig::Instance();
   
    $nick = $ct->getNickname($u->nickid);
    $text = trim($param);
//(etc.)

This might seem obvious if you are into programming this system, but it isn't if you are a newbie -- and the problem is this creates a security issue as well (see my "crash" report.)
fabian
Member
 
Posts: 20
Joined: Fri Mar 28, 2008 11:39 am
Location: Berlin, Germany
Top


Post a reply
5 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

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