summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-25 02:49:44 +0000
committerNaram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-25 02:49:44 +0000
commit4818284fab73a246506323630175f628640b4b95 (patch)
tree87e61c16101d8eb093edf19cfdaea17592616193
parent66df9d4e7cef5d37b7886bf0c014cc517960e890 (diff)
Added superadmin directive to operserv block in new config.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1473 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--data/example_new.conf7
-rw-r--r--include/extern.h2
-rw-r--r--src/config.c4
3 files changed, 10 insertions, 3 deletions
diff --git a/data/example_new.conf b/data/example_new.conf
index 93c016c31..9345a620e 100644
--- a/data/example_new.conf
+++ b/data/example_new.conf
@@ -701,4 +701,11 @@ operserv
* This is commented out by default; make sure you insert the correct nicks before uncommenting it.
*/
#servicesroot = "CyberBotX w00t"
+
+ /*
+ * If set, Services Admins will be able to use SUPERADMIN [ON|OFF] which will temporarily grant
+ * them extra privileges, such as being a founder on ALL channels, ability to adjust another
+ * users' modes, etc. This directive is optional.
+ */
+ #superadmin = yes
}
diff --git a/include/extern.h b/include/extern.h
index 2d2c7360d..99e5e9130 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -376,7 +376,7 @@ E char *GlobalOnCycleUP;
E char **ServicesRoots;
E int RootNumber;
E int LogMaxUsers;
-E int SuperAdmin;
+E bool SuperAdmin;
E int LogBot;
E int AutokillExpiry;
E int ChankillExpiry;
diff --git a/src/config.c b/src/config.c
index 7f2f5256a..5813d825d 100644
--- a/src/config.c
+++ b/src/config.c
@@ -180,7 +180,7 @@ char *GlobalOnCycleUP;
static char *ServicesRoot;
char **ServicesRoots;
int RootNumber;
-int SuperAdmin;
+bool SuperAdmin;
int LogBot;
int LogMaxUsers;
int DisableRaw;
@@ -645,6 +645,7 @@ int ServerConfig::Read(bool bail)
{"operserv", "exceptiondatabase", "exception.db", new ValueContainerChar(&ExceptionDBName), DT_CHARPTR, ValidateNotEmpty},
{"operserv", "autokilldatabase", "akill.db", new ValueContainerChar(&AutokillDBName), DT_CHARPTR, ValidateNotEmpty},
{"operserv", "servicesroot", "", new ValueContainerChar(&ServicesRoot), DT_CHARPTR, ValidateNotEmpty},
+ {"operserv", "superadmin", "no", new ValueContainerBool(&SuperAdmin), DT_BOOLEAN, NoValidation},
{NULL, NULL, NULL, NULL, DT_NOTHING, NoValidation}
};
/* These tags can occur multiple times, and therefore they have special code to read them
@@ -1262,7 +1263,6 @@ Directive directives[] = {
{"LocalAddress", {{PARAM_STRING, 0, &LocalHost},
{PARAM_PORT, PARAM_OPTIONAL, &LocalPort}}},
{"LogUsers", {{PARAM_SET, PARAM_RELOAD, &LogUsers}}},
- {"SuperAdmin", {{PARAM_SET, PARAM_RELOAD, &SuperAdmin}}},
{"LogMaxUsers", {{PARAM_SET, PARAM_RELOAD, &LogMaxUsers}}},
{"MailDelay", {{PARAM_TIME, PARAM_RELOAD, &MailDelay}}},
{"MaxSessionKill", {{PARAM_INT, PARAM_RELOAD, &MaxSessionKill}}},