summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-01-15 16:29:17 -0500
committerAdam <Adam@anope.org>2011-01-15 16:29:37 -0500
commit2631eb2e48b121aa61af88ac68c59478e93f484b (patch)
treef0bf2c43b3e81911fe25de59a3774ae6b5de95f5
parent49970524c8c5e4df2cd7c6baa0954b0a958ba1a4 (diff)
Made CA_SET always be accessable, even if db-converter messes up levels
(cherry picked from commit a4ded88e85efaa1523cb64aca3f0029a0d91a61a)
-rw-r--r--src/chanserv.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/chanserv.cpp b/src/chanserv.cpp
index 67cbf2f47..9b3f7f596 100644
--- a/src/chanserv.cpp
+++ b/src/chanserv.cpp
@@ -539,6 +539,14 @@ int check_access(User *user, ChannelInfo *ci, int what)
level = get_access(user, ci);
limit = ci->levels[what];
+ // Set should never be disabled, if it is it is db-converter screwup
+ // This all needs rewritten anyway...
+ if (what == CA_SET && limit == ACCESS_INVALID)
+ {
+ ci->levels[what] = ACCESS_FOUNDER;
+ limit = ACCESS_FOUNDER;
+ }
+
/* Resetting the last used time */
if (level > 0)
ci->last_used = Anope::CurTime;