function run(&$xml_reponse, $p) { $clientid = $p["clientid"]; $msg = $p["param"]; $sender = $p["sender"]; $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; $flag = isset($p["flag"]) ? $p["flag"] : 7; $c =& pfcGlobalConfig::Instance(); $u =& pfcUserConfig::Instance(); $ct =& pfcContainer::Instance(); if ($c->shownotice > 0 && ($c->shownotice & $flag) == $flag) { $msg = phpFreeChat::FilterSpecialChar($msg); $msg = $flag == 7 ? '(' . $sender . ') ' . $msg : $msg; $nick = $ct->getNickname($u->nickid); $res = $ct->write($recipient, $nick, "notice", $msg); if (is_array($res)) { $cmdp = $p; $cmdp["param"] = implode(",", $res); $cmd =& pfcCommand::Factory("error"); $cmd->run($xml_reponse, $cmdp); return; } } }
</div> <div id="pfc_input_container"> <table style="margin:0;padding:0;border-collapse:collapse;"> <tbody> <tr> <td class="pfc_td1"> <p id="pfc_handle" <?php if (!$frozen_nick) { echo ' title="' . _pfc("Enter your nickname here") . '"' . ' onclick="pfc.askNick(\'\')"' . ' style="cursor: pointer"'; } ?> ><?php echo phpFreeChat::FilterSpecialChar($u->nick); ?> </p> </td> <td class="pfc_td2"> <input type="text" id="pfc_words" title="<?php echo _pfc("Enter your message here"); ?> " maxlength="<?php echo $max_text_len; ?> "/> </td>
/** * Filter messages before they are sent to container */ function PreFilterMsg($msg) { $c =& pfcGlobalConfig::Instance(); if (preg_match("/^\\[/i", $msg)) { // add 25 characteres if the message starts with [ : means there is a bbcode $msg = utf8_substr($msg, 0, $c->max_text_len + 25); } else { $msg = utf8_substr($msg, 0, $c->max_text_len); } $msg = phpFreeChat::FilterSpecialChar($msg); // $msg = phpFreeChat::FilterSmiley($msg); /* if ($msg[0] == "\n") $msg = substr($msg, 1); */ // delete the first \n generated by FF /* if (strpos($msg,"\n") > 0) $msg = "<br/>".$msg; $msg = str_replace("\r\n", "<br/>", $msg); $msg = str_replace("\n", "<br/>", $msg); $msg = str_replace("\t", " ", $msg);*/ //$msg = str_replace(" ", " ", $msg); // $msg = preg_replace('/(http\:\/\/[^\s]*)/i', "<a href=\"$1\">$1</a>", $msg ); return $msg; }