Logo Search packages:      
Sourcecode: znc version File versions  Download package

void Csock::DelCron ( const CS_STRING &  sName,
bool  bDeleteAll = true,
bool  bCaseSensitive = true 
) [virtual]

deletes a cron by name

Parameters:
sName the name of the cron
bDeleteAll delete all crons that match sName
bCaseSensitive use strcmp or strcasecmp

Definition at line 1980 of file Csocket.cpp.

{
      for( u_int a = 0; a < m_vcCrons.size(); a++ )
      {
            int (*Cmp)(const char *, const char *) = ( bCaseSensitive ? strcmp : strcasecmp );
            if ( Cmp( m_vcCrons[a]->GetName().c_str(), sName.c_str() ) == 0 )
            {
                  m_vcCrons[a]->Stop();
                  CS_Delete( m_vcCrons[a] );
                  m_vcCrons.erase( m_vcCrons.begin() + a-- );
                  if( !bDeleteAll )
                        break;
            }
      }
}


Generated by  Doxygen 1.6.0   Back to index