std::string types;
std::string pars;
+ if (!channel || !user)
+ return "";
+
for (unsigned char mode = 'A'; mode <= 'z'; mode++)
{
unsigned char pos = (mode-65) | MASK_CHANNEL;
if (!mw)
return false;
- if ((mw->GetModeType() < 'A') || (mw->GetModeType() > 'z'))
+ if ((mw->GetModeChar() < 'A') || (mw->GetModeChar() > 'z'))
return false;
mw->GetModeType() == MODETYPE_USER ? mask = MASK_USER : mask = MASK_CHANNEL;
ModeWatchIter a = find(modewatchers[pos].begin(),modewatchers[pos].end(),mw);
if (a == modewatchers[pos].end())
+ {
+ ServerInstance->Log(DEBUG, "ModeParser::DelModeWatcher: Couldn't find watcher for mode %c in list", mw->GetModeChar());
return false;
+ }
modewatchers[pos].erase(a);
ServerInstance->Log(DEBUG,"ModeParser::DelModeWatcher: stopped watching mode %c",mw->GetModeChar());
this->AddMode(new ModeUserOperator(Instance), 'o');
this->AddMode(new ModeUserServerNoticeMask(Instance), 'n');
}
-