From b244c74479d48dad53f1f09949715c2ccb245aa3 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 9 Apr 2013 14:51:39 -0500 Subject: [PATCH] Allow privilege descs to be read from the config to override the defaults --- src/config.cpp | 5 +++-- 1 file 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; }