summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes3
-rw-r--r--include/services.h7
-rw-r--r--src/chanserv.c6
-rw-r--r--version.log6
4 files changed, 18 insertions, 4 deletions
diff --git a/Changes b/Changes
index dcb7ac9e5..77ecf4a6d 100644
--- a/Changes
+++ b/Changes
@@ -24,7 +24,8 @@ Anope Version S V N
08/28 F Bug when truncating passwords to PASSMAX with enc_none. [#765]
08/28 F Bug in PTLink protocol where topic time was not being sent. [#763]
08/28 F Automatic displaying of 'Limited to ...' lines in help. [#729]
-08/28 F We now check required commands existance on inspircd11 protocol [#773]
+08/28 F We now check required commands existance on inspircd11 protocol. [#773]
+08/28 F SuperAdmin now always overrules channel founder. [#770]
Anope Version 1.7.19
--------------------
diff --git a/include/services.h b/include/services.h
index 951d0f215..4507e2b4a 100644
--- a/include/services.h
+++ b/include/services.h
@@ -570,10 +570,15 @@ typedef struct {
/* Note that these two levels also serve as exclusive boundaries for valid
* access levels. ACCESS_FOUNDER may be assumed to be strictly greater
* than any valid access level, and ACCESS_INVALID may be assumed to be
- * strictly less than any valid access level.
+ * strictly less than any valid access level. Also read below.
*/
#define ACCESS_FOUNDER 10000 /* Numeric level indicating founder access */
#define ACCESS_INVALID -10000 /* Used in levels[] for disabled settings */
+/* There is one exception to the above access levels: SuperAdmins will have
+ * access level 10001. This level is never stored, however; it is only used
+ * in comparison and to let SuperAdmins win from founders where needed
+ */
+#define ACCESS_SUPERADMIN 10001
/* Levels for xOP */
diff --git a/src/chanserv.c b/src/chanserv.c
index 36faedccb..24fa87ea5 100644
--- a/src/chanserv.c
+++ b/src/chanserv.c
@@ -1889,7 +1889,7 @@ int check_access(User * user, ChannelInfo * ci, int what)
if (level > 0)
ci->last_used = time(NULL);
- if (level == ACCESS_FOUNDER)
+ if (level >= ACCESS_FOUNDER)
return (what == CA_AUTODEOP || what == CA_NOJOIN) ? 0 : 1;
/* Hacks to make flags work */
if (what == CA_AUTODEOP && (ci->flags & CI_SECUREOPS) && level == 0)
@@ -2234,6 +2234,10 @@ int get_access(User * user, ChannelInfo * ci)
if (!ci || !user)
return -1;
+ // SuperAdmin always has highest level
+ if (user->isSuperAdmin)
+ return ACCESS_SUPERADMIN;
+
if (is_founder(user, ci))
return ACCESS_FOUNDER;
diff --git a/version.log b/version.log
index 6eb74527c..b49c689ae 100644
--- a/version.log
+++ b/version.log
@@ -9,10 +9,14 @@ VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="19"
VERSION_EXTRA="-svn"
-VERSION_BUILD="1283"
+VERSION_BUILD="1284"
# $Log$
#
+# BUILD : 1.7.19 (1284)
+# BUGS : 770
+# NOTES : SuperAdmins now have a higher channel level than channel founders so they will always win from founders
+#
# BUILD : 1.7.19 (1283)
# BUGS : 773
# NOTES : Patch provided by katsklaw: This patch makes us check commands existance before issuing and we scream like a girl if its