usage.")"; $cmd =& pfcCommand::Factory("error"); $cmd->run($xml_reponse, $cmdp); return; } 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(); // show a join message $cmdp = $p; $cmdp["param"] = _pfc("%s joins %s",$u->getNickname(), $channame); $cmdp["recipient"] = $chanrecip; $cmdp["recipientid"] = $chanid; $cmdp["flag"] = 2; $cmd =& pfcCommand::Factory("notice"); $cmd->run($xml_reponse, $cmdp); } // register the user (and his metadata) in the channel $ct =& pfcContainer::Instance(); // $ct->createNick($chanrecip, $u->nick, $u->nickid); $ct->joinChan($u->nickid, $chanrecip); $this->forceWhoisReload($u->nickid); // return ok to the client // then the client will create a new tab $xml_reponse->script("pfc.handleResponse('".$this->name."', 'ok', Array('".$chanid."','".addslashes($channame)."'));"); } function GetRecipient($channame) { return "ch_".$channame; } function GetRecipientId($channame) { return md5(pfcCommand_join::GetRecipient($channame)); } } ?>