...
no
stop it
this code is so old and terrible
the theory is correct though
here, have something new
only allows messages from yourself because you're going to add a check for that in your other thing anyway
$MessagePrefix = "#";
$FunctionPrefix = "foo_";
package foobar
{
function NMH_Type::send( %this )
{
%value = %this.getValue();
%length = strLen( $MessagePrefix );
if ( getSubStr( %value, 0, %length ) $= $MessagePrefix )
{
%this.setValue( "" );
%value = getSubStr( %value, %length, strLen( %value ) );
if ( isFunction( %func = $FunctionPrefix @ firstWord( %value ) ) )
{
call( %func, restWords( %value ) );
}
}
parent::send( %this );
}
};
activatePackage( "foobar" );
function foo_ragequit( %args )
{
commandToServer( 'MessageSent', "ragequit or something" );
schedule( serverConnection.getPing() * 2 + 1, 0, "disconnect" );
}
run this and type
#ragequit in chat