<?php
function strip_dupe_tags($sig, $tags) {
preg_match_all('/\[('.$tags.')\].+?\[\/\1\]/sm', $sig, $userbars);
foreach(array_count_values($userbars[1]) as $tag => $num) {
$sig = preg_replace('/\[('.$tag.')\].+?\[\/\1\]/sm', '', $sig, $num - 1);
}
return $sig;
}
$tags = join(array('tag', 'more', /*.. 'another', .. */), '|');
echo strip_dupe_tags('[tag]spam[/tag][tag]spam[/tag][tag]spam[/tag]', $tags);
?>
incoming CNL {
if (packet.ConnNum < highestConnNum) {
p = getPlayerByConnNum(highestConnNum) // end connection
p.ConnNum = packet.ConnNum // is moved down into this slot
}
}
struct IS_CNL // ConN Leave (end connection is moved down into this slot)
struct MsgTypePack // 64 chars - send to LFS to simulate typing message or command
{
char Id [4]; // MST + zero
char Msg [64]; // text message or [B][I]/command[/I][/B], must end with zero
};