diff options
author | Adam <Adam@anope.org> | 2015-09-24 17:22:44 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2015-09-24 17:22:44 -0400 |
commit | 830361e97d03c74e54cb1cf1bbf329dffdeb66f7 (patch) | |
tree | 64820363ede8a25602af34982a7a6364247091da /src/regchannel.cpp | |
parent | 93a92bb73b33b9970a6483f153170442eff95941 (diff) |
Check privilege name is valid in SetLevel
Diffstat (limited to 'src/regchannel.cpp')
-rw-r--r-- | src/regchannel.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/regchannel.cpp b/src/regchannel.cpp index ebc542547..b7c353554 100644 --- a/src/regchannel.cpp +++ b/src/regchannel.cpp @@ -576,6 +576,12 @@ int16_t ChannelInfo::GetLevel(const Anope::string &priv) const void ChannelInfo::SetLevel(const Anope::string &priv, int16_t level) { + if (PrivilegeManager::FindPrivilege(priv) == NULL) + { + Log(LOG_DEBUG) << "Unknown privilege " + priv; + return; + } + this->levels[priv] = level; } |