PFC Version: 1.3
PHP Version: 5.3.3
Shared or Dedicated Hosting: VPS server
Link to your website:
Are you able to reproduce the issue on the official demo (http://www.phpfreechat.net/demo)? No (custom code)
Have you set any parameters?
If so, please include your entire code, using the [code ] and[/code ] tags (without the space).
What is the issue you are experiencing in detail?
Using this.setUserMeta(nickid, 'age', 100); in pfcclient.js does not change the age meta data that was set via $params["nickmeta"] = array("age" => '0'); in index.php
Are you seeing any error messages, such as javascript errors?
There are no error messages, doing /whois nickname returns an age of 0.
I have also tried making a custom command to force the age to change, this fails as well.. (copy of /op command)
- Code: Select all
<?php
require_once(dirname(__FILE__)."/../pfccommand.class.php");
class pfcCommand_age extends pfcCommand
{
var $usage = "/age {nickname} {age}";
function run(&$xml_reponse, $p)
{
$clientid = $p["clientid"];
$param = $p["param"];
$sender = $p["sender"];
$recipient = $p["recipient"];
$recipientid = $p["recipientid"];
$c =& pfcGlobalConfig::Instance();
$u =& pfcUserConfig::Instance();
$ct =& pfcContainer::Instance();
if (trim($param) == "")
{
// error
$cmdp = $p;
$cmdp["param"] = _pfc("Missing parameter");
$cmdp["param"] .= " (".$this->usage.")";
$cmd =& pfcCommand::Factory("error");
$cmd->run($xml_reponse, $cmdp);
return;
}
// just change the "age" meta flag
$nicktoop = trim($param);
$nicktoopid = $ct->getNickId($nicktoop);
$ct->setUserMeta($nicktoopid, 'age', '100'); //<-- this does not work
$this->forceWhoisReload($nicktoopid); //<-- This also does not work
}
}
?>
The funny thing is, the /op command works fine and does a forced whois reload where mine does not, but I guess that is because isadmin is a dynamic var?
I read that the /away custom command no longer works with PFC 1.3, is anyone looking into why the setUserMeta function is failing?
Thanks.