
#include "gcomm.h"
#include "majorbbs.h"
#include "tlcapi.hpp"
#include "tlcdyncm.hpp"

#define FILREV "$Revision: 1 $"
MARKSOURCE(tlcdyncm);

CDynamicCommand::CDynamicCommand(LPCMDSTRUCT st) :
          CTlcCommand(st->pszLong,st->pszShort,st->fNSpace,st->bTOnly), pFuncs(st)
{
     if (CHECKFC(construct)) {
          pFuncs->construct();
     }
}

CDynamicCommand::~CDynamicCommand()
{
     if (CHECKFC(destruct)) {
          pFuncs->destruct();
     }
}

SHORT
CDynamicCommand::DoCmd(LPCMDPARAM pParam)
{
     if (CHECKFC(docmdfunc)) {
          return(pFuncs->docmdfunc(pParam));
     }
     return(0);
}
