summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-25 21:07:54 +0000
committerNaram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-25 21:07:54 +0000
commitb6014ca8e5c6787af29c951e157eecc34bde0c99 (patch)
treeffd5f70e0d9808b29feab2dd6f036900cd01c315
parent9b109412dfe56dc6c1db91dd920d75f5cb3a8876 (diff)
Added akillonadd directive to operserv block in new config.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1476 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 bb4baa938..0cb6c9811 100644
--- a/data/example_new.conf
+++ b/data/example_new.conf
@@ -724,4 +724,11 @@ operserv
sglineexpiry = 30d
sqlineexpiry = 30d
szlineexpiry = 30d
+
+ /*
+ * If set, this option will make Services send an AKILL command immediately after it has been
+ * added with AKILL ADD. This eliminates the need for killing the user after the AKILL has
+ * been added. This directive is optional.
+ */
+ #akillonadd = yes
}
diff --git a/include/extern.h b/include/extern.h
index ba113d6c5..13bc85894 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -383,7 +383,7 @@ E time_t ChankillExpiry;
E time_t SGLineExpiry;
E time_t SQLineExpiry;
E time_t SZLineExpiry;
-E int AkillOnAdd;
+E bool AkillOnAdd;
E int KillonSGline;
E int KillonSQline;
E int DisableRaw;
diff --git a/src/config.c b/src/config.c
index 44f17dd50..9914b6d2b 100644
--- a/src/config.c
+++ b/src/config.c
@@ -189,7 +189,7 @@ time_t ChankillExpiry;
time_t SGLineExpiry;
time_t SQLineExpiry;
time_t SZLineExpiry;
-int AkillOnAdd;
+bool AkillOnAdd;
int KillonSGline;
int KillonSQline;
int WallOper;
@@ -652,6 +652,7 @@ int ServerConfig::Read(bool bail)
{"operserv", "sglineexpiry", "0", new ValueContainerTime(&SGLineExpiry), DT_TIME, ValidateNotZero},
{"operserv", "sqlineexpiry", "0", new ValueContainerTime(&SQLineExpiry), DT_TIME, ValidateNotZero},
{"operserv", "szlineexpiry", "0", new ValueContainerTime(&SZLineExpiry), DT_TIME, ValidateNotZero},
+ {"operserv", "akillonadd", "no", new ValueContainerBool(&AkillOnAdd), 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
@@ -1225,7 +1226,6 @@ bool ValueItem::GetBool()
/*************************************************************************/
Directive directives[] = {
- {"AkillOnAdd", {{PARAM_SET, PARAM_RELOAD, &AkillOnAdd}}},
{"BadPassLimit", {{PARAM_POSINT, PARAM_RELOAD, &BadPassLimit}}},
{"BadPassTimeout", {{PARAM_TIME, PARAM_RELOAD, &BadPassTimeout}}},
{"BotCoreModules", {{PARAM_STRING, PARAM_RELOAD, &BotCoreModules}}},