summaryrefslogtreecommitdiff
path: root/src/config.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-04-09 14:51:39 -0500
committerAdam <Adam@anope.org>2013-04-09 14:51:39 -0500
commitb244c74479d48dad53f1f09949715c2ccb245aa3 (patch)
tree2c0d07de66c5ee912f9bb9dd1ed8cd6b6bf03089 /src/config.cpp
parentb76b2e11c80bb100c48e4eec9a51c53cd079d181 (diff)
Allow privilege descs to be read from the config to override the defaults
Diffstat (limited to 'src/config.cpp')
-rw-r--r--src/config.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/config.cpp b/src/config.cpp
index d49d9e8d9..2637964fa 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -812,13 +812,14 @@ static bool InitPrivileges(ServerConfig *config, const Anope::string &)
static bool DoPrivileges(ServerConfig *config, const Anope::string &, const Anope::string *, ValueList &values, int *)
{
Anope::string name = values[0].GetValue();
- int rank = values[1].GetInteger();
+ Anope::string desc = values[1].GetValue();
+ int rank = values[2].GetInteger();
ValueItem vi(name);
if (!ValidateNotEmpty(config, "privilege", "name", vi))
throw ConfigException("One or more values in your configuration file failed to validate. Please see your log for more information.");
- PrivilegeManager::AddPrivilege(Privilege(name, "", rank));
+ PrivilegeManager::AddPrivilege(Privilege(name, desc, rank));
return true;
}