Script Name: remoteNet
Script Description: script allowing to add subnets to admin list
Original Author: cooz
Core Version: 2.5.2
var
i: integer;
remotenet,adminip,joinip: TStringArray;
function OnRequestGame(IP: string;State: integer):integer;
begin
remotenet:= split(ReadFile('remotenet.txt'),chr(13)+chr(10));
for i:=0 to arrayhigh(remotenet)-1 do begin
adminip:= split(remotenet[i],'.');
joinip:= split(IP,'.');
if((adminip[0]+adminip[1]+adminip[2])=(joinip[0]+joinip[1]+joinip[2])) then begin command('/admip '+IP); end;
end;
result := state;
end;
notes:
you have to create remotenet.txt file and add to it IPs, example file could look like this:
127.0.0.*
10.0.0.*
192.168.10.*
notice that script use split() function so it won't work properly on current linux server version
[!!]warning, script used in incorrect way can cause security risks[!!]
that would be all,