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:
+2
-7
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user