However, now that I got the thing working, I find multiple rooms are not working. Can anyone help? It just keeps saying 'Sorry, such file does not exist...'. I've tried everything I can think of. Here is the code;
- Code: Select all
// create the customized command
require_once dirname(__FILE__)."/src/pfccommand.class.php";
class pfcCommand_roll extends pfcCommand {
function run(&$xml_reponse, $clientid, $msg) {
$c =& $this->c;
$nick = $c->nick;
$container =& $c->getContainerInstance();
$text = trim($msg);
// Call parse roll
require_once dirname(__FILE__).'/dice.class.php';
$dice = new Dice();
if (!$dice->check($text)) {
$result = $dice->error_get();
$cmd =& pfcCommand::Factory("error", $c);
$cmd->run($xml_reponse, $clientid, "Cmd_roll failed: " . $result);
}
else
{
$result = $dice->roll();
$container->writeMsg($nick, $result);
}
if ($c->debug) pxlog("Cmd_roll[".$c->sessionid."]: msg=".$result, "chat", $c->getId());
}
}
require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params["title"] = "Welcome to the Stickler's Rest chat-room!";
$params["nick"] = "guest"; // setup the intitial nickname
$params["height"] = "500px";
// do not uses width parameter because of a display bug in IE6
//$params["width"] = "650px";
$params["channel"] = isset($_GET["channel"]) ? $_GET["channel"] : "Out_of_Character";
$params["max_msg"] = 0;
$params["max_text_len"] = 1500;
$params["max_nick_len"] = 30;
$params["clock"] = false;
$params["showsmileys"] = false;
$params["btn_sh_smileys"] = false;
$params["themepath"] = dirname(__FILE__)."/sticky";
$params["theme"] = "mytheme";
$chat = new phpFreeChat( $params );
$chat->printJavascript();
$chat->printStyle();
global $prefix, $db, $sitename, $admin, $module_name;
include("header.php");
OpenTable();
echo'<p><center>:: <a href="?name=Chat?channel=Out_of_Character">#Out_of_Character</a> :: <a href="?name=Chat?channel=Phastidiar">#Phastidiar</a> :: <a href="?name=Chat?channel=The_Rift">#The_Rift</a> :: <a href="?name=Chat?channel=War_of_the_Elements">#War_of_the_Elements</a> :: <a href="?name=Chat?channel=Silent_Hill">#Silent_Hill</a> :: <a href="?name=Chat?channel=The_Crusades">#The_Crusades</a> ::</center></p>';
$c =& phpFreeChatConfig::Instance();
echo '<p>You are in #'.$c->channel.'</p>';
I hope you can help me, as I really want this thing to take off - it is wonderful!