Esempio n. 1
0
bool IRCCmd::ParamsValid(_CDATA *CD, int pCnt)
{
    CD->PCOUNT = pCnt;
    if(CD->PARAMS.size() == 0)
        return false;
    return ValidParams(CD->PARAMS, pCnt);
}
Esempio n. 2
0
int IRCCmd::ParamsValid(_CDATA *CD, int pCnt, int rLev)
{
    //CD->PCOUNT = pCnt;
    if(!CanUse(CD->USER, rLev))
        return E_AUTH;
    else if(pCnt == 0)
        return E_OK;
    else if(CD->PARAMS.size() == 0)
        return E_SIZE;
    else if(!ValidParams(CD->PARAMS, pCnt))
        return E_SIZE;
    return E_OK;
}
Esempio n. 3
0
CDataLoader* CSRA_DataLoaderCF::CreateAndRegister(
    CObjectManager& om,
    const TPluginManagerParamTree* params) const
{
    if ( !ValidParams(params) ) {
        // Use constructor without arguments
        return CSRADataLoader::RegisterInObjectManager(om).GetLoader();
    }
    // IsDefault and Priority arguments may be specified
    return CSRADataLoader::RegisterInObjectManager(
        om,
        GetIsDefault(params),
        GetPriority(params)).GetLoader();
}