1
0
mirror of https://github.com/anope/anope.git synced 2026-07-01 22:46:39 +02:00

Made auto* chanserv privileges not hard coded.

Made cs_statusupdate not remove status on users if they still match other entries.
Move privilege descriptions out of the config
This commit is contained in:
Adam
2013-04-08 00:19:07 -05:00
parent fb7fef7a84
commit 1a37e1c048
11 changed files with 136 additions and 139 deletions
+2 -7
View File
@@ -812,18 +812,13 @@ 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();
Anope::string desc = values[1].GetValue();
int rank = values[2].GetInteger();
int rank = values[1].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.");
vi = ValueItem(desc);
if (!ValidateNotEmpty(config, "privilege", "desc", 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, desc, rank));
PrivilegeManager::AddPrivilege(Privilege(name, "", rank));
return true;
}