heres a cleaner version:
reasons:
1) checks for admin( if they have admin it wont boot)
2) checks for superadmin
3) the strings have spaces so if someone says "I have a tucan in my garden, it crapped a load." it wont boot.
4) checks for everything in one if to avoid can i or may i questions not being sent.
5) checks for things like "could i" or "can me" or "give me"
package mao
{
function servercmdmessagesent(%client,%msg,%value1,%value2)
{
if(strstr(strlwr(%msg)," can i ")>-1 && !%client.isadmin && strstr(strlwr(%msg)," admin") > -1)
{
//echo("omgthisworks");
%client.delete("No you can't have admin/Load somthing");
messageall(5,'\c3%1 Was kicked for asking for admin/loading something',%client.name);
return;
}
if(strstr(strlwr(%msg)," may i ")>-1 && !%client.isadmin && strstr(strlwr(%msg)," admin") > -1)
{
//echo("omgthisworks");
%client.delete("No you can't have admin/Load somthing");
messageall(5,'\c3%1 Was kicked for asking for admin/loading something',%client.name);
return;
}
if(strstr(strlwr(%msg)," can i ")>-1 && !%client.isadmin && strstr(strlwr(%msg)," superadmin") > -1)
{
//echo("omgthisworks");
%client.delete("No you can't have admin/Load somthing");
messageall(5,'\c3%1 Was kicked for asking for admin/loading something',%client.name);
return;
}
if(strstr(strlwr(%msg)," may i ")>-1 && !%client.isadmin && strstr(strlwr(%msg)," superadmin") > -1)
{
//echo("omgthisworks");
%client.delete("No you can't have admin/Load somthing");
messageall(5,'\c3%1 Was kicked for asking for admin/loading something',%client.name);
return;
}
if(strstr(strlwr(%msg)," can i ")>-1 && !%client.isadmin && strstr(strlwr(%msg)," load") > -1)
{
//echo("omgthisworks");
%client.delete("No you can't have admin/Load somthing");
messageall(5,'\c3%1 Was kicked for asking for admin/loading something',%client.name);
return;
}
if(strstr(strlwr(%msg)," may i ")>-1 && !%client.isadmin && strstr(strlwr(%msg)," load") > -1)
{
//echo("omgthisworks");
%client.delete("No you can't have admin/Load somthing");
messageall(5,'\c3%1 Was kicked for asking for admin/loading something',%client.name);
return;
}
if(strstr(strlwr(%msg)," could i ")>-1 && !%client.isadmin && strstr(strlwr(%msg)," superadmin") > -1)
{
//echo("omgthisworks");
%client.delete("No you can't have admin/Load somthing");
messageall(5,'\c3%1 Was kicked for asking for admin/loading something',%client.name);
return;
}
if(strstr(strlwr(%msg)," can me ")>-1 && !%client.isadmin && strstr(strlwr(%msg)," superadmin") > -1)
{
//echo("omgthisworks");
%client.delete("No you can't have admin/Load somthing");
messageall(5,'\c3%1 Was kicked for asking for admin/loading something',%client.name);
return;
}
if(strstr(strlwr(%msg)," could i ")>-1 && !%client.isadmin && strstr(strlwr(%msg)," admin") > -1)
{
//echo("omgthisworks");
%client.delete("No you can't have admin/Load somthing");
messageall(5,'\c3%1 Was kicked for asking for admin/loading something',%client.name);
return;
}
if(strstr(strlwr(%msg)," can me ")>-1 && !%client.isadmin && strstr(strlwr(%msg)," admin") > -1)
{
//echo("omgthisworks");
%client.delete("No you can't have admin/Load somthing");
messageall(5,'\c3%1 Was kicked for asking for admin/loading something',%client.name);
return;
}
if(strstr(strlwr(%msg)," could i ")>-1 && !%client.isadmin && strstr(strlwr(%msg)," load") > -1)
{
//echo("omgthisworks");
%client.delete("No you can't have admin/Load somthing");
messageall(5,'\c3%1 Was kicked for asking for admin/loading something',%client.name);
return;
}
if(strstr(strlwr(%msg)," can me ")>-1 && !%client.isadmin && strstr(strlwr(%msg)," load") > -1)
{
//echo("omgthisworks");
%client.delete("No you can't have admin/Load somthing");
messageall(5,'\c3%1 Was kicked for asking for admin/loading something',%client.name);
return;
}
if(strstr(strlwr(%msg)," give me ")>-1 && !%client.isadmin && strstr(strlwr(%msg)," superadmin") > -1)
{
//echo("omgthisworks");
%client.delete("No you can't have admin/Load somthing");
messageall(5,'\c3%1 Was kicked for asking for admin/loading something',%client.name);
return;
}
if(strstr(strlwr(%msg)," let me ")>-1 && !%client.isadmin && strstr(strlwr(%msg)," superadmin") > -1)
{
//echo("omgthisworks");
%client.delete("No you can't have admin/Load somthing");
messageall(5,'\c3%1 Was kicked for asking for admin/loading something',%client.name);
return;
}
if(strstr(strlwr(%msg)," give me ")>-1 && !%client.isadmin && strstr(strlwr(%msg)," admin") > -1)
{
//echo("omgthisworks");
%client.delete("No you can't have admin/Load somthing");
messageall(5,'\c3%1 Was kicked for asking for admin/loading something',%client.name);
return;
}
if(strstr(strlwr(%msg)," let me ")>-1 && !%client.isadmin && strstr(strlwr(%msg)," admin") > -1)
{
//echo("omgthisworks");
%client.delete("No you can't have admin/Load somthing");
messageall(5,'\c3%1 Was kicked for asking for admin/loading something',%client.name);
return;
}
if(strstr(strlwr(%msg)," give me ")>-1 && !%client.isadmin && strstr(strlwr(%msg)," load") > -1)
{
//echo("omgthisworks");
%client.delete("No you can't have admin/Load somthing");
messageall(5,'\c3%1 Was kicked for asking for admin/loading something',%client.name);
return;
}
if(strstr(strlwr(%msg)," let me ")>-1 && !%client.isadmin && strstr(strlwr(%msg)," load") > -1)
{
//echo("omgthisworks");
%client.delete("No you can't have admin/Load somthing");
messageall(5,'\c3%1 Was kicked for asking for admin/loading something',%client.name);
return;
}
parent::servercmdmessagesent(%client,%msg,%value1,%value2);
}
};
activatepackage(mao);
yes I do realize its much longer.
also i fixed the activatepackage