- irc::spacesepstream allowstream(alwaysexempt), denystream(neverexempt);
- std::string current;
-
- if (chan->GetPrefixValue(user) != OP_VALUE)
- return MOD_RES_PASSTHRU; // They're not opped, so we don't exempt them
- while(denystream.GetToken(current))
- if (!strcasecmp(restriction, current.c_str())) return MOD_RES_PASSTHRU; // This mode is set to never allow exemptions in the config
- while(allowstream.GetToken(current))
- if (!strcasecmp(restriction, current.c_str())) return MOD_RES_ALLOW; // This mode is set to always allow exemptions in the config
-
- modelist* list = ec.extItem.get(chan);
-
- if (!list) return MOD_RES_PASSTHRU;
- for (modelist::iterator i = list->begin(); i != list->end(); ++i)
- if (!strcasecmp(restriction, i->mask.c_str()))
- return MOD_RES_ALLOW; // They're opped, and the channel lets ops bypass this mode. Allow regardless of restrictions