- memset(DisabledUModes, 0, sizeof(DisabledUModes));
- std::string modes = ConfValue("disabled")->getString("usermodes");
- for (std::string::const_iterator p = modes.begin(); p != modes.end(); ++p)
- {
- // Complain when the character is not a-z or A-Z
- if ((*p < 'A') || (*p > 'z') || ((*p < 'a') && (*p > 'Z')))
- throw CoreException("Invalid usermode " + std::string(1, *p) + " was found.");
- DisabledUModes[*p - 'A'] = 1;
- }
-
- memset(DisabledCModes, 0, sizeof(DisabledCModes));
- modes = ConfValue("disabled")->getString("chanmodes");
- for (std::string::const_iterator p = modes.begin(); p != modes.end(); ++p)
- {
- if ((*p < 'A') || (*p > 'z') || ((*p < 'a') && (*p > 'Z')))
- throw CoreException("Invalid chanmode " + std::string(1, *p) + " was found.");
- DisabledCModes[*p - 'A'] = 1;
- }
-
- memset(HideModeLists, 0, sizeof(HideModeLists));
- modes = ConfValue("security")->getString("hidemodes");
- for (std::string::const_iterator p = modes.begin(); p != modes.end(); ++p)
- HideModeLists[(unsigned char) *p] = true;
-
- std::string v = security->getString("announceinvites");
-
- if (v == "ops")
- AnnounceInvites = ServerConfig::INVITE_ANNOUNCE_OPS;
- else if (v == "all")
- AnnounceInvites = ServerConfig::INVITE_ANNOUNCE_ALL;
- else if (v == "dynamic")
- AnnounceInvites = ServerConfig::INVITE_ANNOUNCE_DYNAMIC;
- else
- AnnounceInvites = ServerConfig::INVITE_ANNOUNCE_NONE;
-
- v = security->getString("operspywhois");
- if (v == "splitmsg")
- OperSpyWhois = SPYWHOIS_SPLITMSG;
- else if (v == "on" || v == "yes")
- OperSpyWhois = SPYWHOIS_SINGLEMSG;
+ const std::string restrictbannedusers = options->getString("restrictbannedusers", "yes", 1);
+ if (stdalgo::string::equalsci(restrictbannedusers, "no"))
+ RestrictBannedUsers = ServerConfig::BUT_NORMAL;
+ else if (stdalgo::string::equalsci(restrictbannedusers, "silent"))
+ RestrictBannedUsers = ServerConfig::BUT_RESTRICT_SILENT;
+ else if (stdalgo::string::equalsci(restrictbannedusers, "yes"))
+ RestrictBannedUsers = ServerConfig::BUT_RESTRICT_NOTIFY;