Blockland Forums > Suggestions & Requests
[SCRIPT] Auto-Kick Multi-Clients
Tendon:
It's not guaranteed that the host will have admin. See $Pref::Server::AutoAdminServerOwner in config/server/prefs.cs.
isSuperAdmin and isAdmin are not dependent on each other. I've seen and made code which unintentionally separates them. So I would not suggest depending on this.
I've finished, tested, and packaged the script as it was originally requested.
Script_KickDups
--- Code: (server.cs) ---package kickDupsPackage
{
function GameConnection::StartLoad(%client)
{
Parent::StartLoad(%client);
if(%client.bl_id == getNumKeyID())
return;
if(%client.isAdmin)
return;
if(%client.isSuperAdmin)
return;
%count = ClientGroup.getCount();
for(%i=0;%i<%count;%i++)
{
%obj = ClientGroup.getObject(%i);
if(%obj == %client)
continue;
if(%obj.bl_id == %client.bl_id)
{
%client.schedule(0,"delete","No multiclienting.");
return;
}
}
}
};
activatepackage(kickDupsPackage);
--- End code ---