diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/configparser.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_autoop.cpp | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/configparser.cpp b/src/configparser.cpp index 4a0c9b58d..6b1b47e6d 100644 --- a/src/configparser.cpp +++ b/src/configparser.cpp @@ -76,7 +76,7 @@ struct Parser int ch = next(); while (isspace(ch)) ch = next(); - while (isalnum(ch) || ch == '_') + while (isalnum(ch) || ch == '_'|| ch == '-') { rv.push_back(ch); ch = next(); diff --git a/src/modules/m_autoop.cpp b/src/modules/m_autoop.cpp index 5dc54fba6..b96495bf7 100644 --- a/src/modules/m_autoop.cpp +++ b/src/modules/m_autoop.cpp @@ -36,8 +36,12 @@ class AutoOpList : public ListModeBase { pos--; ModeHandler* mh = ServerInstance->Modes->FindMode(parameter[pos], MODETYPE_CHANNEL); - if (adding && !mh) + if (adding && (!mh || !mh->GetPrefixRank())) + { + source->WriteNumeric(415, "%s %c :Cannot find prefix mode '%c' for autoop", + source->nick.c_str(), parameter[pos], parameter[pos]); return MOD_RES_DENY; + } else if (!mh) continue; @@ -45,7 +49,11 @@ class AutoOpList : public ListModeBase if (mh->AccessCheck(source, channel, dummy, true) == MOD_RES_DENY) return MOD_RES_DENY; if (mh->GetLevelRequired() > mylevel) + { + source->WriteNumeric(482, "%s %s :You must be able to set mode '%c' to include it in an autoop", + source->nick.c_str(), channel->name.c_str(), parameter[pos]); return MOD_RES_DENY; + } } return MOD_RES_PASSTHRU; } |