예제 #1
0
파일: MapVote.cpp 프로젝트: ChadSki/Phasor
	e_command_result sv_mapvote_size(void*,
		commands::CArgParser& args, COutStream& out)
	{
		if (mapvote_in_progress)
			out << "You must wait until the current vote has finished." << endl;
		else {
			mapvote_option_count = args.ReadUInt(2);
			out << "Only " << (int)mapvote_option_count << " options will be displayed." << endl;
		}
		return e_command_result::kProcessed;
	}
예제 #2
0
파일: MapVote.cpp 프로젝트: ChadSki/Phasor
	e_command_result sv_mapvote_del(void*, 
		commands::CArgParser& args, COutStream& out)
	{
		size_t index = args.ReadUInt(1, mapvote_list.size());
		mapvote_list.erase(mapvote_list.begin() + index-1);
		if (!mapvote_list.size()) {
			out << "No more votable maps. Map voting disabled." << endl;
			mapvote_enabled = false;
		}
		return e_command_result::kProcessed;
	}
예제 #3
0
	e_command_result sv_kickafk(void*, 
		commands::CArgParser& args, COutStream& out)
	{
		CAFKDetection::max_duration = args.ReadUInt();

		if (CAFKDetection::max_duration)
			out << "Inactive players will be kicked after " << 
			CAFKDetection::max_duration << " minutes(s)" << endl;
		else
			out << "Inactive players will no longer be kicked." << endl;

		return e_command_result::kProcessed;
	}