Author Topic: Master Lock  (Read 1607 times)

0 Members and 1 Guest are viewing this topic.

Offline freestyler

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 326
Master Lock
« on: October 13, 2008, 10:42:19 am »
Name: Master Lock
Short description: Locks all admin commands with one master command
Author: fri
Compile test: passed
Core version: 2.6.3
Hosted by: Soldat Central - http://soldatcentral.com/

Full description:
This script allows any admin to completely block administrative commands for all players, so they can't /kick or /ban anyone, change game password, modify time limit, etc. The only command that would work is the master one (default: /masterlock, I suggest changing it to something 'weird').
Of course it will work only against admins that don't have the access to script files.


'How do I block other scripts?'
If you want to make it affect other scripts, you have to put this code:

Code: [Select]
if CrossFunc([], 'MasterLock.Lock') = true then exit;
at the very beginning of OnCommand function in the specified script, so it will look like this:

Code: [Select]
function OnCommand(ID: Byte; Text: string): boolean;
begin
if CrossFunc([], 'MasterLock.Lock') = true then exit;
{ rest of the original script }
end;

thanks to DorkeyDear for help with CrossFunc.



(Size 807 B)
- http://soldatcentral.com/index.php?page=script&f=58 -


** Script hosted by Soldat Central! Please visit the author's script page and rate this script **

Offline UnknownSniper

  • Camper
  • ***
  • Posts: 428
  • Southern by the Grace of God
Re: Master Lock
« Reply #1 on: October 13, 2008, 10:50:29 am »
Nice script, but the head admin could just take the administrative powers from the person they're trying to block to save time, right? O.o
I had a job and a piece of land
My sweet wife was my best friend
But I traded that for Cocaine and a whore
-Jamey Johnson


Offline freestyler

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 326
Re: Master Lock
« Reply #2 on: October 13, 2008, 10:58:51 am »
If that person knows the adminlog, taking administrative powers from him wouldn't solve the problem (you'd have to change adminlog manually through FTP and restart the server). This method is faster.

Offline Iq Unlimited

  • Flagrunner
  • ****
  • Posts: 864
  • mr. foobar2000
Re: Master Lock
« Reply #3 on: October 13, 2008, 12:09:47 pm »
Suggestion: Make it so that it blocks only certain commands via an .ini file.

Offline Mr

  • Inactive Soldat Developer
  • Soldier
  • ******
  • Posts: 166
Re: Master Lock
« Reply #4 on: October 14, 2008, 12:59:55 am »
Suggestion: /masterlock ID
Or better: /masterlock Password ID