示例#1
0
文件: Admin.cpp 项目: ChadSki/Phasor
	e_command_result sv_public(void*, commands::CArgParser& args, COutStream& out)
	{
		// sv_public only actually works before the server starts, but meh
		bool enable = args.ReadBool();
		if (!enable) challenge_admins = false;
		return e_command_result::kGiveToHalo;
	}
示例#2
0
	e_command_result sv_script_load(void*, 
		commands::CArgParser& args, COutStream& out)
	{
		std::string script = args.ReadString();
		bool persistent = false;
		if (args.size() == 2) persistent = args.ReadBool();
		
		if (g_Scripts->OpenScript(script.c_str(), persistent))
			out << script << " has been loaded." << endl;
		else
			out << script << " couldn't be loaded." << endl;
		return e_command_result::kProcessed;
	}
示例#3
0
	e_command_result sv_mapvote(void*, 
		commands::CArgParser& args, COutStream& out)
	{
		bool enable = args.ReadBool();
		if (enable && !mapvote_list.size()) {
			out << "You need to add some options before enabling, see sv_mapvote_add." << endl;
			return e_command_result::kProcessed;
		}
		mapvote_enabled = enable;
		out << "Map voting has been " << (mapvote_enabled ? "enabled" : "disabled")
			<< endl;
		return e_command_result::kProcessed;
	}
示例#4
0
文件: Admin.cpp 项目: ChadSki/Phasor
	e_command_result sv_admin_check(void*, commands::CArgParser& args, COutStream& out)
	{
		challenge_admins = args.ReadBool();
		out << "admin challenging is " << (challenge_admins ? "enabled" : "disabled") << endl;
		return e_command_result::kProcessed;
	}