Loading...   


	std::map<std::string, CommandRecord *>::iterator cur,end;
	cur = commandlist.begin();
	end = commandlist.end();
	std::map<std::string,uint8> command_settings;
	std::map<std::string,uint8>::iterator itr;
	database.GetCommandSettings(command_settings);
	for(; cur != end; ++cur) {
		if ((itr=command_settings.find(cur->first))!=command_settings.end())
		{
			cur->second->access = itr->second;
#if EQDEBUG >=11
			LogFile->write(EQEMuLog::Debug, "command_init(): - Command '%s' set to access level %d." , cur->first.c_str(), itr->second);
#endif
		}
		else
		{
#ifdef COMMANDS_WARNINGS
			if(cur->second->access == 0)
				LogFile->write(EQEMuLog::Status, "command_init(): Warning: Command '%s' defaulting to access level 0!" , cur->first.c_str());
#endif
		}
	}

	command_dispatch = command_realdispatch;

	return commandcount;

Raw Paste Data