I was trying to make a script so if you are not an admin while the package was enabled you would be removed from the server upon connect. For some reason when I typed it up I have no syntax errors but it kicks all players before the server can even check if you are an admin.
Source Code
package AdminOnly
{
function GameConnection::autoAdminCheck(%client)
{
if(%client.isSuperAdmin)
{
return "";
}
else
{
messageAll(%client.name @ " has been blocked from the server.");
%client.delete("Admin Only is blocking you from joining this server.");
echo("A player has been blocked from joining the server.");
}
}
};
activatePackage(AdminOnly);
Console Log
Got connect request from IPX:00000000:000000000000:0
net name = Matthew Padilla
Connection established
Connected successfully, killing other pending connections
AUTHCHECK: Matthew Padilla = LAN client -> internet server, auth with server ip
246 add-ons found.
Auth Init Successfull: Matthew Padilla
CADD: 14284 local
+- bl_id = 42931
+- no auto admin
*** Sending mission load to client:
Posting to master server
Posting to rtb server
*** New Mission
*** Phase 1: Download Datablocks & Targets
Received manifest and requested 646 blobs. (255 duplicates removed)
Got non-CURLE_OK result on a request, result was 3 'URL using bad/illegal format or missing URL'
- Request was for ''
Got non-CURLE_OK result on a request, result was 3 'URL using bad/illegal format or missing URL'
- Request was for ''
Got non-CURLE_OK result on a request, result was 3 'URL using bad/illegal format or missing URL'
- Request was for ''
Got non-CURLE_OK result on a request, result was 3 'URL using bad/illegal format or missing URL'
- Request was for ''
Got non-CURLE_OK result on a request, result was 3 'URL using bad/illegal format or missing URL'
- Request was for ''
Got non-CURLE_OK result on a request, result was 3 'URL using bad/illegal format or missing URL'
- Request was for ''
Got non-CURLE_OK result on a request, result was 3 'URL using bad/illegal format or missing URL'
- Request was for ''
Got non-CURLE_OK result on a request, result was 3 'URL using bad/illegal format or missing URL'
- Request was for ''
CDN Download finished
Could not locate texture: base/data/shapes/player/Add-Ons/Face_Jirue/KleinerSmiley (download failed, using default texture)
+- using blank texture
Could not locate texture: base/data/shapes/player/Add-Ons/Decal_Default/Space-Old (download failed, using default texture)
+- using blank texture
*** Phase 2: Download Ghost Objects
*** Phase 3: Mission Lighting
Mission lighting done
Executing config/client/Favorites.cs.
Matthew Padilla spawned.
Got Connect challenge Request from 76.250.77.218:33635
Got connect request from 76.250.77.218:33635
net name = Matthew Padilla
AUTHCHECK: Matthew Padilla = internet client -> internet server, regular auth
Auth Init Successfull: Matthew Padilla
CADD: 15504 76.250.77.218:33635
+- bl_id = 42931
A player has been blocked from joining the server.
+- no auto admin
*** Sending mission load to client:
Posting to master server
Posting to rtb server
Issuing Disconnect packet.
CDROP: 15504 76.250.77.218:33635
base/server/mainServer.cs (671): Unable to find object: '' attempting to call function 'killDupes'
BackTrace: ->servAuthTCPobj::onLine
base/server/mainServer.cs (674): Unable to find object: '' attempting to call function 'schedule'
BackTrace: ->servAuthTCPobj::onLine
This was testing while on my own server, joining on multiple clients.