1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
class pfcCommand_join extends pfcCommand
{
var $usage = "/join {channelname}";
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();
$channame = trim($param);
$chanrecip = pfcCommand_join::GetRecipient($channame);
$chanid = pfcCommand_join::GetRecipientId($channame);
if ($channame == "")
{
...
}
if(!isset($u->channels[$chanid]))
{
if ($c->max_channels <= count($u->channels))
{
// the maximum number of joined channels has been reached
$xml_reponse->script("pfc.handleResponse('".$this->name."', 'max_channels', Array());");
return;
}
$u->channels[$chanid]["recipient"] = $chanrecip;
$u->channels[$chanid]["name"] = $channame;
$u->saveInCache();
... |