Author Topic: Admin Dynamic IP's without Adminlog!  (Read 9661 times)

0 Members and 1 Guest are viewing this topic.

Offline mikembm

  • Soldier
  • **
  • Posts: 210
Admin Dynamic IP's without Adminlog!
« on: April 30, 2007, 06:52:28 pm »
Script Name: Admin Dynamic IP's without Adminlog!
Script Description: Most of the time it is a bad idea to give out adminlog. It gives then access to ARSSE and makes them unable to be kicked or banned. This script allows the use of a "/admin admin_pass" command. Also because of the 100 IP limit on the remote admin list, this does not add their IP to it - It merely sends the commands a player does if he is admin.
Original Author(s): mikembm
Core Version: 2.6.0
Code:

*Be sure to set both the change_pass and the login_pass

Code: [Select]
const
ADMIN_CHANGE_PASS = 'change_pass';

var
admins: array[1..32] of byte;
ADMIN_LOGIN_PASS: String;

procedure ActivateServer();
begin
ADMIN_LOGIN_PASS := 'login_pass';
end;

function OnPlayerCommand(ID: Byte; Text: string): boolean;
var
commands,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);
begin
admins[ID] := 0;
end;

procedure OnLeaveGame(ID, Team: byte; Kicked: boolean);
begin
admins[ID] := 0;
end;

UPDATE: Added ability to change login password in-game
just use: /adminchange change_pass new_pass
« Last Edit: July 16, 2008, 02:09:08 am by mikembm »

Offline Dread Lord

  • Major(1)
  • Posts: 12
  • Dread Lord Data
Re: Admin Dynamic IP's without Adminlog!
« Reply #1 on: May 01, 2007, 02:18:41 pm »
ty

Offline mikembm

  • Soldier
  • **
  • Posts: 210
Re: Admin Dynamic IP's without Adminlog!
« Reply #2 on: May 02, 2007, 05:42:03 am »
UPDATE: Made it so that you specify which commands are allowed.

Offline HEX

  • Major
  • *
  • Posts: 77
  • =tNt=
    • SoldatX Brazilian Community
Re: Admin Dynamic IP's without Adminlog!
« Reply #3 on: May 02, 2007, 06:37:24 am »
Hey hey hey, sweeeet. I`ll use it. Thanks a lot!
+1 karma.



Offline n2j3

  • Soldier
  • **
  • Posts: 152
    • soldat.gr
Re: Admin Dynamic IP's without Adminlog!
« Reply #4 on: May 07, 2007, 08:20:52 pm »
Very useful indeed :)

Offline SilentChameleon

  • Major(1)
  • Posts: 4
  • Congratubacons!!!!!
Re: Admin Dynamic IP's without Adminlog!
« Reply #5 on: May 07, 2007, 10:30:22 pm »
Lawl n2 I have no idea what you're talking about, but thats just me.
Fetch me a gyros!
xoxo
No wai jose!               Wai Wai 2wais <3

Offline zgrabarz

  • Major(1)
  • Posts: 22
Re: Admin Dynamic IP's without Adminlog!
« Reply #6 on: May 08, 2007, 03:34:58 am »
yep it's fine.. but when server is full 'mini admin' can't join there... so it's useless

Offline K_Sparkz

  • Major(1)
  • Posts: 13
Re: Admin Dynamic IP's without Adminlog!
« Reply #7 on: August 13, 2007, 02:56:16 pm »
Will it then be possible for the "real" admin.. to ban ppl, so they can't login as "mini" admin???

Offline mikembm

  • Soldier
  • **
  • Posts: 210
Re: Admin Dynamic IP's without Adminlog!
« Reply #8 on: August 13, 2007, 03:02:41 pm »
Will it then be possible for the "real" admin.. to ban ppl, so they can't login as "mini" admin???
yes

Offline K_Sparkz

  • Major(1)
  • Posts: 13
Re: Admin Dynamic IP's without Adminlog!
« Reply #9 on: August 13, 2007, 03:05:03 pm »
would u care to explain how??

Offline mikembm

  • Soldier
  • **
  • Posts: 210
Re: Admin Dynamic IP's without Adminlog!
« Reply #10 on: August 13, 2007, 03:07:08 pm »
Well there is nothing preventing commands in the onCommand procedure.. So if you are a real admin (you are a remote admin or you have adminlog) then you can do all the commands.

Offline K_Sparkz

  • Major(1)
  • Posts: 13
Re: Admin Dynamic IP's without Adminlog!
« Reply #11 on: August 13, 2007, 03:11:15 pm »
yea,, then I can ban him enterialy from the server! but he should still be able to play, but not login as "mini" admin.. so eventhough he knows the password, he wouldn't be able to use it!

Offline mikembm

  • Soldier
  • **
  • Posts: 210
Re: Admin Dynamic IP's without Adminlog!
« Reply #12 on: August 13, 2007, 03:19:39 pm »
Well that's why there is the option to change the password. Banning an IP from using it wont stop him if he has a dynamic IP - it also won't stop him from telling other people the password just to piss you off. That's why you should only give the password to people who you know won't abuse it.

Offline K_Sparkz

  • Major(1)
  • Posts: 13
Re: Admin Dynamic IP's without Adminlog!
« Reply #13 on: August 15, 2007, 03:25:16 pm »
ofcourse!!! so if he abuse.. he will simply get banned and hopping hes ip dont change!! :D
Thx for quick reply... definatly a usefull script!! gj

Date Posted: August 13, 2007, 04:23:33 PM
So I came up with this brilliant idea.... to make a password for each players! so they got different passwords, and therefor will be able to delete the password of the abusing admin! so if u got the time, and fells energised, it could be a nice ekstra to the script!!

Offline toRch

  • Major
  • *
  • Posts: 55
  • <3
Re: Admin Dynamic IP's without Adminlog!
« Reply #14 on: August 15, 2007, 07:24:39 pm »
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:  :-*  [retard]

Offline mikembm

  • Soldier
  • **
  • Posts: 210
Re: Admin Dynamic IP's without Adminlog!
« Reply #15 on: August 15, 2007, 07:55:01 pm »
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:  :-*  [retard]

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.

Offline toRch

  • Major
  • *
  • Posts: 55
  • <3
Re: Admin Dynamic IP's without Adminlog!
« Reply #16 on: August 15, 2007, 09:02:13 pm »
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:  :-*  [retard]

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.
oh wow. for real? good job man.
i ever hoped for something like this to appear in this section of this forum. once i even tried to manage it myself.. thank you!

Offline Envy

  • Major(1)
  • Posts: 37
    • Myth - NA Soldat Clan
Re: Admin Dynamic IP's without Adminlog!
« Reply #17 on: October 20, 2007, 01:11:47 pm »
How do i work this script? I've added it to my scripting folder but nothing happens?

Please Refrain From Editing. ;)

Offline ironplug

  • Major(1)
  • Posts: 7
Re: Admin Dynamic IP's without Adminlog!
« Reply #18 on: October 21, 2007, 12:51:23 am »
« on: April 30, 2007, 07:52:28 pm » subject up :/

Offline Envy

  • Major(1)
  • Posts: 37
    • Myth - NA Soldat Clan
Re: Admin Dynamic IP's without Adminlog!
« Reply #19 on: October 21, 2007, 02:13:53 am »
point being?

Please Refrain From Editing. ;)