void CServerDefinitions::BuildPriorityMap( DEFINITIONCATEGORIES category, UI08& wasPrioritized )
{
	cDirectoryListing priorityFile( category, "priority.nfo", false );
	STRINGLIST *longList = priorityFile.List();
	if( longList->size() > 0 )
	{
		std::string filename = (*longList)[0];
		//	Do we have any priority informat?
		if( FileExists( filename ) )	// the file exists, so perhaps we do
		{
			Script *prio = new Script( filename, category, false );	// generate a script for it
			if( prio != NULL )	// successfully made a script
			{
				UString tag;
				UString data;
				ScriptSection *prioInfo = prio->FindEntry( "PRIORITY" );	// find the priority entry
				if( prioInfo != NULL )
				{
					for( tag = prioInfo->First(); !prioInfo->AtEnd(); tag = prioInfo->Next() )	// keep grabbing priority info
					{
						data = prioInfo->GrabData();
						if( tag.upper() == "DEFAULTPRIORITY" )
							defaultPriority = data.toShort();
						else
						{
							std::string filenametemp = tag.lower();
							priorityMap[filenametemp] = data.toShort();
						}
					}
					wasPrioritized = 0;
				}
				else
					wasPrioritized = 1;
				delete prio;	// remove script
				prio = NULL;
			}
			else
				wasPrioritized = 2;
			return;
		}
	}
#if defined( UOX_DEBUG_MODE )
//	Console.Warning( "Failed to open priority.nfo for reading in %s DFN", dirnames[category].c_str() );
#endif
	wasPrioritized = 2;
}
ScriptSection *CServerDefinitions::FindEntry( std::string toFind, DEFINITIONCATEGORIES typeToFind )
{
	ScriptSection *rvalue = NULL;

	if( !toFind.empty() && typeToFind != NUM_DEFS )
	{
		UString tUFind = UString( toFind ).upper();

		VECSCRIPTLIST& toDel = ScriptListings[typeToFind];
		for( VECSCRIPTLIST_CITERATOR dIter = toDel.begin(); dIter != toDel.end(); ++dIter )
		{
			Script *toCheck = (*dIter);
			if( toCheck != NULL )
			{
				rvalue = toCheck->FindEntry( tUFind );
				if( rvalue != NULL )
					break;
			}
		}
	}
	return rvalue;
}