summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-13 23:08:47 +0000
committerNaram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-13 23:08:47 +0000
commitc912a7a0aa814590c79a3f3c6226ad557feec564 (patch)
tree22e93cd2b919b469e5a9796610893f836bb3e9d3
parent2402098d978fba51caa4467dbbe5a036b67b2f15 (diff)
Added inhabit directive to chanserv block in new config.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1439 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--data/example_new.conf6
-rw-r--r--include/extern.h2
-rw-r--r--src/config.c5
3 files changed, 9 insertions, 4 deletions
diff --git a/data/example_new.conf b/data/example_new.conf
index cbc055639..b3966514e 100644
--- a/data/example_new.conf
+++ b/data/example_new.conf
@@ -405,4 +405,10 @@ chanserv
* The default reason for an autokick if none is given.
*/
autokickreason = "User has been banned from the channel"
+
+ /*
+ * The length of time ChanServ stays in a channel after kicking a user from a channel they are not
+ * premitted to be in. This only occurs when the user is the only one in the channel.
+ */
+ inhabit = 15s
}
diff --git a/include/extern.h b/include/extern.h
index 32dc35cfe..ac50d9903 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -348,7 +348,7 @@ E int CSDefBantype;
E int CSAccessMax;
E int CSAutokickMax;
E char *CSAutokickReason;
-E int CSInhabit;
+E time_t CSInhabit;
E int CSListOpersOnly;
E int CSListMax;
E int CSRestrictGetPass;
diff --git a/src/config.c b/src/config.c
index 8e584dfcf..c09a9b32c 100644
--- a/src/config.c
+++ b/src/config.c
@@ -150,7 +150,7 @@ int CSDefBantype;
int CSAccessMax;
int CSAutokickMax;
char *CSAutokickReason;
-int CSInhabit;
+time_t CSInhabit;
int CSListOpersOnly;
int CSListMax;
int CSRestrictGetPass;
@@ -589,6 +589,7 @@ int ServerConfig::Read(bool bail)
{"chanserv", "accessmax", "0", new ValueContainerInt(&CSAccessMax), DT_INTEGER, ValidateNotZero},
{"chanserv", "autokickmax", "0", new ValueContainerInt(&CSAutokickMax), DT_INTEGER, ValidateNotZero},
{"chanserv", "autokickreason", "User has been banned from the channel", new ValueContainerChar(&CSAutokickReason), DT_CHARPTR, ValidateNotEmpty},
+ {"chanserv", "inhabit", "0", new ValueContainerTime(&CSInhabit), DT_TIME, ValidateNotZero},
{NULL, NULL, NULL, NULL, DT_NOTHING, NoValidation}
};
/* These tags can occur multiple times, and therefore they have special code to read them
@@ -1190,7 +1191,6 @@ Directive directives[] = {
{"HostServName", {{PARAM_STRING, 0, &s_HostServ},
{PARAM_STRING, 0, &desc_HostServ}}},
{"ChanCoreModules", {{PARAM_STRING, PARAM_RELOAD, &ChanCoreModules}}},
- {"CSInhabit", {{PARAM_TIME, PARAM_RELOAD, &CSInhabit}}},
{"CSListMax", {{PARAM_POSINT, PARAM_RELOAD, &CSListMax}}},
{"CSListOpersOnly", {{PARAM_SET, PARAM_RELOAD, &CSListOpersOnly}}},
{"CSRestrictGetPass", {{PARAM_SET, PARAM_RELOAD, &CSRestrictGetPass}}},
@@ -1692,7 +1692,6 @@ int read_config(int reload)
CHECK(ReadTimeout);
CHECK(WarningTimeout);
CHECK(TimeoutCheck);
- CHECK(CSInhabit);
CHECK(CSListMax);
CHECK(ServicesRoot);
CHECK(AutokillExpiry);