bool AnnouncerManager::DoesAnnouncerExist( RString sAnnouncerName ) { if( sAnnouncerName == "" ) return true; vector<RString> asAnnouncerNames; GetAnnouncerNames( asAnnouncerNames ); for( unsigned i=0; i<asAnnouncerNames.size(); i++ ) if( 0==strcasecmp(sAnnouncerName, asAnnouncerNames[i]) ) return true; return false; }
bool AnnouncerManager::DoesAnnouncerExist( CString sAnnouncerName ) { if( sAnnouncerName == "" ) return true; CStringArray asAnnouncerNames; GetAnnouncerNames( asAnnouncerNames ); for( unsigned i=0; i<asAnnouncerNames.size(); i++ ) if( 0==stricmp(sAnnouncerName, asAnnouncerNames[i]) ) return true; return false; }
void AnnouncerManager::NextAnnouncer() { vector<RString> as; GetAnnouncerNames( as ); if( as.size()==0 ) return; if( m_sCurAnnouncerName == "" ) SwitchAnnouncer( as[0] ); else { unsigned i; for( i=0; i<as.size(); i++ ) if( as[i].EqualsNoCase(m_sCurAnnouncerName) ) break; if( i==as.size()-1 ) SwitchAnnouncer( "" ); else { int iNewIndex = (i+1)%as.size(); SwitchAnnouncer( as[iNewIndex] ); } } }