mirror of
https://github.com/anope/anope.git
synced 2026-06-27 18:26:39 +02:00
Check privilege name is valid in SetLevel
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user