AutoExtract/AutoExtract.cpp
#include "AutoExtract.h"
AutoExtract g_cInstance;
AutoExtract::AutoExtract( void ) :
FileEvent( this )
{
FileEvent.Connect(
Kernel()->FileEvent );
};
{
{
if ( FileEvent->m_eType == FileEventNotifier::typePostRead && FileEvent->m_sFileName.right( 4 ) ==
NTRQ(
".mud" ) )
{
RequestDeferredEvent( FileEvent );
};
};
{
bool bHadExtraction = false;
for ( Node *pNode = Node::First(); pNode; pNode = pNode->Next() )
{
if ( pNode->IsKindOf( MapExtractor::StaticClass() ) )
{
MapExtractor *pE = dynamic_cast<MapExtractor *>( pNode );
{
if ( sName.
indexOf(
"autoextract" ) != -1 )
{
pE->Execute( false );
bHadExtraction = true;
};
};
};
};
if ( bHadExtraction )
};
};