fu :p
um..
this version uses Writer's Event Manager (included in Presto)
$Message::MaxLen = 128+32;
function Message::FixLineBreak(%client, %msg) {
if(String::findSubStr(%msg, "\n") != -1) {
echo("Found linebreak: - "@%msg);
Client::centerPrint("<jc><f0>BLOCKED STRING", 1);
Schedule("Client::centerPrint(\"\", 1);", 4);
return mute;
}
if(String::findSubStr(%msg, "\t") != -1) {
echo("Found tab: - "@%msg);
Client::centerPrint("<jc><f0>BLOCKED STRING", 1);
Schedule("Client::centerPrint(\"\", 1);", 4);
return mute;
}
if(String::len(%msg) > $Message::MaxLen) {
echo("BLOCKED LONG STRING - "@%msg);
Client::centerPrint("<jc><f0>BLOCKED LONG STRING", 1);
Schedule("Client::centerPrint(\"\", 1);", 4);
return mute;
}
}
Event::Attach(eventClientMessage, Message::FixLineBreak);