Author Topic: Sub Admin Login  (Read 4061 times)

0 Members and 1 Guest are viewing this topic.

Offline Rampage_Terranius

  • Major
  • *
  • Posts: 69
  • The Strategist
    • Soldat Noob Servers
Sub Admin Login
« on: October 03, 2008, 09:01:04 am »
Script Name: Sub Admin Login
Script Description control admins commands and ip
Author: Rampage_Terranius
Compile Test: Passed
Core Version: 2.6.3
Hosted by: Soldat Central - http://soldatcentral.com/

Full Description:
This is a small subadmin script i made a while back due to admins abusing their powers it allows you to control what commands they may use and you can monitor the commands they do use

Sub Admin Script goes into the scripts folder

Admin goes into the servers root directory

In the folder Admin you create the admins files each area in the file must be in that exact same case Rampage and
rampage are different

here is an example of how to set it out

Rampage_Terranius.ini:
[Admin]
Password=c4ca4238a0b923820dcc509a6f75849b <------ this is obviously the password its an md5string so you will prob need to encrypt your own passes to set in here
SayRulesOnLogin=True <------ this is whether or not the rules will be stated to this admin True will say it any other value will not
OnlyOneIpAllowed=True <------ this is for if you want to lock the player to only one ip it can be very useful for stopping admins sharing their files but the down side is that if some one has a dynamic ip it will stop then from logging in
Ip=127.0.0.1 <------ this is the ip they are locked to using it doesnt need a value if OnlyOneIpAllowed is off
Chat= <--- if something is here then the player will be told this on loging in
NoBan= <--- if True then can not be banned


[Commands]
Allowed=/kick /ban /recompile /say /unban /kicklast /unbanlast /banlast /kill /pm <------ this is the commands this player is allowed to add more commands just simply add them in there make sure to have a space between each command and a / at the start of each


you can also use /subadmincreate (username) (password) to create a defult file in server which is generally the easier way to do it

to login a player will use /subadminlog (then the name of the file)  (then the password in the file in this case the password is 1) after it will tell them the rules if SayRulesOnLogin = true then they must use /i accept to gain admin ship this is so that noobs cant say "but it didnt tell me the rules" they would of had to read the rules to know to use that command ;) thats pretty much it im sure ive messed up something in this script if u find a bug let me know



(Size 2.52 KB)
- http://soldatcentral.com/index.php?page=script&f=48 -


** Script hosted by Soldat Central! Please visit the authors script page and Rate this script **

i plan to recode this script later on cause its a bit messed up but it works as is i figured i might as well release it to the public it might help someone at least

Offline Bonecrusher

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1397
  • High above
    • Zabijaka.pl
Re: Sub Admin Login
« Reply #1 on: October 03, 2008, 05:38:52 pm »
good job, i guess i will use it

Im chill like that

Offline Rampage_Terranius

  • Major
  • *
  • Posts: 69
  • The Strategist
    • Soldat Noob Servers
Re: Sub Admin Login
« Reply #2 on: October 14, 2008, 10:09:44 am »
 some of its a little messed up currently so sorry for that but it works for its purpose i plan to recode most of it tomorrow tho

Date Posted: October 03, 2008, 07:41:13 pm
i finally got around to recoding sub admin login so heres the new one

Script Name: Sub Admin Login
Script Description control admins commands and ip
Author: Rampage_Terranius
Compile Test: Passed
Core Version: 2.6.3
Hosted by: Soldat Central - http://soldatcentral.com/

Full Description:
This is a small subadmin script i made a while back due to admins abusing their powers it allows you to control what commands they may use and you can monitor the commands they do use

I finally got around to fixing this script up and i might add more things to it still

Sub Admin is now using my Function Read and now organises all admin files into one single file for example coming from Admin/Admin.txt:
[Tyler]39c63ddb96a31b9610cd976b896ad4f0 1 0 127.0.0.1 1 1 [Chat]wicked sick[Allowed]/kick /ban /recompile /say /unban /kicklast /unbanlast /banlast /kill /pm[Tyler/]

[Brown]6f1ed002ab5595859014ebf0951522d9  1 0 127.0.0.1 1 1 [Chat]0[Allowed]/kick /ban /recompile /say /unban /kicklast /unbanlast /banlast /kill /pm[Brown/]

[Owns]6f1ed002ab5595859014ebf0951522d9 1 0 127.0.0.1 1 1 [Chat]0[Allowed]/kick /ban /recompile /say /unban /kicklast /unbanlast /banlast /kill /pm[Owns/]

[You]f850038cdc0d2f2820556b22f58c38b3 1 0 127.0.0.1 1 1 [Chat]0[Allowed]/kick /ban /recompile /say /unban /kicklast /unbanlast /banlast /kill /pm[You/]

It is set up alot differently from the old style

Place Admin folder in your soldat servers root directory
Admin.txt is where your admins are stored
Log.txt is all the logs of admin commands etc...

Place Sub Admin Script into the scripts folder

when you read the settings
0 = Off
1 = On

This is what each number etc means

[StartLoadHere]PassWord Say_Rules_At_Login   Only_One_Ip_Allowed   Ip_To_Force   Dont_Allow_player_To_Be_Banned   Log_This_Admins_Commands_Into_Log.txt   [LoadChatFromHere]What To Say To The Player When They Login (put 0 to disable this)[EndLoadHere]

You can use /subadmincreate username password to automatically create a file then modify from there the file will use your pre defined default settings that you set up in the script here

Const
//Defults for when creating an admin file
//0 = off
//1 = on
FileChat= '0';//what will be said to the player when they login put a 0 to disable it from chatting
SayRulesOnLogin= '1';//if the player will be told the rules when loging in
OnlyOneIpAllowed= '0';//i would suggest leaving this off and setting up the ips by hand
Ip= '127.0.0.1';//ip to be set in file i would suggest leaving this and setting this up by hand
NoBan= '1';//if on then the file will automaticaally be unbaned if banned
DefultCommands= '/kick /ban /recompile /say /unban /kicklast /unbanlast /banlast /kill /pm';//defult commands to be given to a created file
LogFilesCommands= '1';//if on then this admins commands will automatically be logged to the file Admin/Log.txt




(Size 3.06 KB)
- http://soldatcentral.com/index.php?page=script&f=48 -


** Script hosted by Soldat Central! Please visit the author's script page and Rate this script **
« Last Edit: October 14, 2008, 10:28:29 am by Rampage_Terranius »

Offline Leo

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1011
Re: Sub Admin Login
« Reply #3 on: October 14, 2008, 03:41:31 pm »
What's the command for an admin to login if you allow multiply IP's ?

Offline Rampage_Terranius

  • Major
  • *
  • Posts: 69
  • The Strategist
    • Soldat Noob Servers
Re: Sub Admin Login
« Reply #4 on: October 14, 2008, 08:37:14 pm »
currently you can only force 1 ip to them if you choose to but i do plan to set it up to allow as many as you choose but to answer your question you still login like normal the difference will be if you dont have the correct ip you get this 'Incorrect IP'

Edit: also who ever uses this might want to modify the rules that come up to how they want (i plan to set the rules into the constants at a later point)
« Last Edit: October 14, 2008, 08:40:01 pm by Rampage_Terranius »

Offline iDante

  • Veteran
  • *****
  • Posts: 1967
Re: Sub Admin Login
« Reply #5 on: October 14, 2008, 11:49:46 pm »
The INI should go somewhat like this:
Code: [Select]
[Captain]
Description=Can do basic clan war commands
Password=lalala
Commands=/map /pause /restart

[Mediator]
Description=Can keep order in the server
Password=lalalaBUTBETTER
Commands=/kick /ban /unban /unbanlast /banlast etc...
Do not include an IP or a name
For what to do when IP's change, O noes
Instead go with a simple like above
And rival to all you shall surely be.

Offline Leo

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1011
Re: Sub Admin Login
« Reply #6 on: October 15, 2008, 09:02:30 am »
The INI should go somewhat like this:
Code: [Select]
[Captain]
Description=Can do basic clan war commands
Password=lalala
Commands=/map /pause /restart

[Mediator]
Description=Can keep order in the server
Password=lalalaBUTBETTER
Commands=/kick /ban /unban /unbanlast /banlast etc...
Do not include an IP or a name
For what to do when IP's change, O noes
Instead go with a simple like above
And rival to all you shall surely be.

Indeed, just a password is better idea.

Offline Rampage_Terranius

  • Major
  • *
  • Posts: 69
  • The Strategist
    • Soldat Noob Servers
Re: Sub Admin Login
« Reply #7 on: October 15, 2008, 09:09:38 am »
i hate readini and i want it set up in a way to conserve server space and using it like this saves more space then having Password= Commands= in it etc...

but.... i do get your point it does make it a little hard to understand what each value is for etc...

the older version used readini each file was separate like this:
[Admin]
Password=2cfd09b4f0861aad40f1abb4f22d71cd
SayRulesOnLogin=True
OnlyOneIpAllowed=False
Ip=127.0.0.1
Chat=
NoBan=True

[Commands]
Allowed=/kick /ban /recompile /say /unban /kicklast /unbanlast /banlast /kill /pm

the problem was that it became cluttered

ill work on simplifying it up to make it easy and simple to use as currently its hard to use if you didnt create the script lol

also ip is there so you can stop people sharing their admin files, if you decide to you can turn off the ip

Edit: also i made this script so i could control almost everything about the admins so thats why it has the ip checker chat to player on login etc...

Edit Again:
i changed around the saving style
[NameGoesHere]
//1 = On
//0 = Off
PassWord=49ee3087348e8d44e1feda19174439870
SayRulesOnLogin=1
ForceToIP=0
IPs=127.0.0.1
NoBan=1
LogCommands=1
Chat=0
AllowedCommands=/kick /ban /recompile /say /unban /kicklast /unbanlast /banlast /kill /pm
[NameGoesHere/]

that should be alot more easier for people to understand ill update the upload once im finish testing it

I swear This Is The Last Edit:
alright ive changed the layout to how i said above you should note the IPs will look for multiple ips now not just a single one (put a space between each ip) ALSO ive added an Auto-File login setting
AutoFile = '0';//automattically will log a joining player into a file you choose (please make sure the admin actually exists in Admin.txt) turn this off by using 0
it does exactly what it says if the value is a admin file it will automatically log players that join into that file (useful for if you want to give normal players a few extra commands) im uploading the new script now.....
« Last Edit: October 15, 2008, 10:19:47 am by Rampage_Terranius »

Offline dragus

  • Major(1)
  • Posts: 23
Re: Sub Admin Login
« Reply #8 on: November 10, 2008, 03:30:56 pm »
hey where i must put files? :-\

Offline Rampage_Terranius

  • Major
  • *
  • Posts: 69
  • The Strategist
    • Soldat Noob Servers
Re: Sub Admin Login
« Reply #9 on: November 11, 2008, 12:20:37 am »
put SubAdminScript into the Scripts folder

and place Admin into the servers root directory

btw you need to be using the soldat script core server (not the dedicated one that comes with soldat)

Offline dragus

  • Major(1)
  • Posts: 23
Re: Sub Admin Login
« Reply #10 on: November 11, 2008, 01:49:24 am »
heh soldat scribt where is?? :D

Offline Rampage_Terranius

  • Major
  • *
  • Posts: 69
  • The Strategist
    • Soldat Noob Servers
Re: Sub Admin Login
« Reply #11 on: November 11, 2008, 02:10:16 am »

Offline dragus

  • Major(1)
  • Posts: 23
Re: Sub Admin Login
« Reply #12 on: November 11, 2008, 03:57:59 am »
hey you can give to me guide ;P  i know flies go to script. Where i must put code?
« Last Edit: November 11, 2008, 03:56:19 pm by dragus »

Offline Rampage_Terranius

  • Major
  • *
  • Posts: 69
  • The Strategist
    • Soldat Noob Servers
Re: Sub Admin Login
« Reply #13 on: November 12, 2008, 03:55:27 am »
Setting up a server and requirements to run a server http://forums.soldat.pl/index.php?topic=95.0

Quote from: chrisgbk
To install older scripts with the latest version of the dedicated server, all you need to do is create a subdirectory of the scripts folder, and move all the PAS files and the includes.txt from the script you want to install into that directory.

Recently released scripts are supposed to be released in ZIP format, with the subdirectory already set up so you can easily drag and drop from the ZIP file into your scripts folder without having to do the above.

Edit: I found a slight bug for linux servers causing the last command in the AllowedCommands list to not work ive now fixed it and uploaded the update

« Last Edit: November 12, 2008, 05:56:01 pm by Rampage_Terranius »

Offline dragus

  • Major(1)
  • Posts: 23
Re: Sub Admin Login
« Reply #14 on: November 13, 2008, 01:39:25 am »
Rampage teterius can help me there  8)
http://forums.soldat.pl/index.php?topic=31064.0