Hi
If use mutator ServerColor, server name use scecial chars for color codes. Add filter non ASCII codes please for server names.
Code: Select all
function getASCII ( $text ) {
$newtext = "";
for ($i=0; $i<strlen($text); $i++) {
$char = substr($text, $i, 1);
$ascii = ord($char);
if ($ascii > 47 && $ascii < 58) $newtext .= $char;
if ($ascii > 64 && $ascii < 91) $newtext .= $char;
if ($ascii > 96 && $ascii < 123) $newtext .= $char;
if ($char == "-") $newtext .= $char;
if ($char == "_") $newtext .= $char;
if ($char == ".") $newtext .= $char;
if ($char == "<") $newtext .= $char;
if ($char == ">") $newtext .= $char;
if ($char == " ") $newtext .= $char;
if ($char == "|") $newtext .= $char;
if ($char == "/") $newtext .= $char;
if ($char == ":") $newtext .= $char;
if ($char == "%") $newtext .= $char;
}
return $newtext;
}
I don't know that. But color codes this not ANCII chars, this special unicod character and it can filter my function.I don't want the editor program, I need to know how the codes work.
Cool, Panther add new feature please