Poll

read below

Uhh i didnt even wanna run a poll
0 (0%)
I had no time to take this off.
0 (0%)

Total Members Voted: 0

Author Topic: Anti Invite Edit  (Read 294 times)

This is the Anti-Invite Add-On:

$pref::server::disallowinvites = true;
if (isFile("Add-Ons/System_ReturnToBlockland/server.cs"))
   RTB_registerPref("Dissallow Invites", "Trust Invites", "$pref::server::disallowinvites", "bool", "server_antiInvite", true, false, false);


package antiInvite
{
   function gameConnection::autoAdminCheck(%a,%b,%c)
   {
      parent::autoAdminCheck(%a,%b,%c);
      if($pref::server::disallowinvites == true)
         commandToClient(%a,'messageBoxOk',"Anti Trust Invite by infiniteLoop","If you send any trust invites, you will be automatically kicked.");
   }
   
   function serverCmdTrust_invite(%a,%b,%c,%d,%e,%f)
   {
      if($pref::server::disallowinvites == true)
      {
         messageAll('',"\c3The server \c2kicked \c3"@%a.name@"\c2(ID: "@%a.bl_id@") \c3for sending trust invites.");
         %a.delete();
      }
      else
         parent::serverCmdTrust_invite(%a,%b,%c,%d,%e,%f);
   }
};
activatePackage(antiInvite);

What do I change to make it like cat's? (Make it so that it doesn't kick Admins or above.)
Excuse my newbiness for scripting.

Replace

Code: [Select]
      if($pref::server::disallowinvites == true)
with

Code: [Select]
      if($pref::server::disallowinvites && !%a.isAdmin)
done.