Author Topic: My auto kick people who ask for admin  (Read 3643 times)

This command will kick some one if they ask for admin or to load some thing, I got pissed of people asking for admin and stuff and in the last hour this has kicked 3 people for asking for admin and loading some thing.

package mao
{
function servercmdmessagesent(%client,%msg,%value1,%value2)
{
   if(strstr(strlwr(%msg),"can i")>-1 || strstr(strlwr(%msg),"may i")>-1)
   {
      if(strstr(strlwr(%msg),"admin") > -1 || 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 somthing',%client.name);
      }
   }
   else
   {
      parent::servercmdmessagesent(%client,%msg,%value1,%value2);
   }
}
};
activatepackage("mao");

Some may argue that its not fair to noobs, however the benefits far outweigh the adverse effects of the script.

For those who don't know what to do with this (Heh, if you don't you're the person this script targets) just put this in your Blockland/Add-ons folder.

There are many things wrong with this.

If somebody types a perfectly reasonable question containing "Can I" or "May I" then it's not sent.
It kicks admins.
It would kick the host.
It detects things that there's nothing wrong with:
Quote
I once had a tucan in my garden, it stuff a load.
(I know nobody would actually ever say that, but you get the idea)

Et cetera..

Quote
I once had a tucan in my garden, it have a badminton court

 :cookieMonster:

You done: activatepackage("moa");

The ""s will mess it up IIRC

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"
Code: [Select]
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


Can I have a soda?

*Colten has left the server


It won't work. You have put spaces before the " Can I " etc. and therefore if somebody started their message with "Can I ..." then it wouldn't detect it. Also, that script could be easily made much shorter and with less copied and pasted ifs.

Also, serverCmdMessageSent only has two parameters/arguments.

Where does it check for Super Admin?

I think it sets %isadmin to 1 aswell when your a super.

What is your friend asks for admin pass and not a noob? itll kick him too?

Even though i also find people asking for Admin who are new to a server annoying. The recent production of these sort of scripts has me worried that it will drive new players  away from Blockland making the game unpopular and profit would drop by a large amount. Eventually leading Badspot to make a new sort of game and close Blockland to get a good income for his work.

As a suggestion i think it would be appropriate to at least leave them with a message explaining how begging for admin when you barely know the server is annoying. And don't put anything offensive in it, Like "Don't ask for admin noob."