/*
 *
 * Cheating Death Compliance settings
 * (c) 2002 by the Evil Human Ressources Director
 * MaxMarx@hydrixos.de
 *
 */
 
#include <core>
#include <console>
#include <string>
#include <admin>
#include <adminlib>
 
#define ACCESS_CD 512
 
new STRING_VERSION[MAX_DATA_LENGTH] = "1.0";
 
public admin_cdmode(HLCommand,HLData,HLUserName,UserIndex) {
	new User[MAX_NAME_LENGTH];
	new Data[MAX_DATA_LENGTH];
	new Command[MAX_COMMAND_LENGTH];
 
        convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
        convert_string(HLData,Data,MAX_DATA_LENGTH);
        convert_string(HLUserName,User,MAX_NAME_LENGTH);
 
	if (Data[0]=='1') { exec("cdrequired 1"); say("Cheating-Death Compliance now REQUIRED."); }
	if (Data[0]=='0') { exec("cdrequired 0"); say("Cheating-Death Compliance now OPTIONAL."); }
	log_command(User,Command,Data);
	return PLUGIN_HANDLED;
}
 
public plugin_init() {
	plugin_registerinfo("EHRD's Cheating-Death plugin","admin_cdmode",STRING_VERSION);
	plugin_registercmd("admin_cdmode","admin_cdmode",ACCESS_CD,"admin_cdmode < 0 | 1 >: Setzt CD-Compliance ( 1 == req && 0 == opt) .");
 
	return PLUGIN_CONTINUE;
}