0 Members and 2 Guests are viewing this topic.
constADMIN_CHANGE_PASS = 'change_pass';varadmins: array[1..32] of byte;ADMIN_LOGIN_PASS: String;procedure ActivateServer();beginADMIN_LOGIN_PASS := 'login_pass';end;function OnPlayerCommand(ID: Byte; Text: string): boolean;varcommands,cmd: String;begin //list of allowed commands - must be comma separated, must end in a comma commands := '/kick,/kicklast,/ban,/banip,/setteam1,/setteam2,/setteam5,/unbanlast,/map,/kill,/pm,/say,/gmute,/pause,/restart,/limit,/password,/lobby,'; cmd := LowerCase(GetPiece(Text,' ',0)) + ','; if (admins[ID] = 1) and (ContainsString(commands,cmd)) then Command(Text); if Text = '/admin ' + ADMIN_LOGIN_PASS then begin SayToPlayer(ID, 'You have been added as a game admin'); admins[ID] := 1; end; if MaskCheck(Text, '/adminchange * *') then if GetPiece(Text,' ',1) = ADMIN_CHANGE_PASS then begin ADMIN_LOGIN_PASS := GetPiece(Text,' ',2); SayToPlayer(ID,'Admin login password has been changed'); end; Result := false;end;procedure OnJoinGame(ID, Team: byte);beginadmins[ID] := 0;end;procedure OnLeaveGame(ID, Team: byte; Kicked: boolean);beginadmins[ID] := 0;end;
Will it then be possible for the "real" admin.. to ban ppl, so they can't login as "mini" admin???
so.. just to be sure: this script enables one to declare people who might use all commands in that 'list' but may be kicked, banned and so on, too. true? if so:
Quote from: toRch on August 15, 2007, 07:24:39 pmso.. just to be sure: this script enables one to declare people who might use all commands in that 'list' but may be kicked, banned and so on, too. true? if so: It enables you have have something similar to adminlog, except arsse cant be used by it, the people can be kicked and banned, you can control what commands they can use, and the password can be changed in-game without requiring a server restart.