summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-10-18 16:53:00 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-10-18 16:53:00 +0000
commitb5c1cf4e2cbb3b47134e26e63bbebc3f5d77e150 (patch)
tree6c433bf92d236783cc78fce7db2a8f093ec7e233
parent4354774fe57e579087f6ba121f5569a8cda52d09 (diff)
Convert a number of modules to using privs.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10676 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_auditorium.cpp2
-rw-r--r--src/modules/m_hidechans.cpp2
-rw-r--r--src/modules/m_hideoper.cpp11
3 files changed, 12 insertions, 3 deletions
diff --git a/src/modules/m_auditorium.cpp b/src/modules/m_auditorium.cpp
index 26dd9d43f..f928b3512 100644
--- a/src/modules/m_auditorium.cpp
+++ b/src/modules/m_auditorium.cpp
@@ -96,7 +96,7 @@ class ModuleAuditorium : public Module
return;
/* If user is oper and operoverride is on, don't touch the list */
- if (OperOverride && IS_OPER(user))
+ if (OperOverride && user->HasPrivPermission("channels/auspex"))
return;
if (ShowOps && (issuer != user) && (channel->GetStatus(user) < STATUS_OP))
diff --git a/src/modules/m_hidechans.cpp b/src/modules/m_hidechans.cpp
index d73c0e214..7f0b289b6 100644
--- a/src/modules/m_hidechans.cpp
+++ b/src/modules/m_hidechans.cpp
@@ -97,7 +97,7 @@ class ModuleHideChans : public Module
return 1;
/* doesn't affect opers, sender is opered */
- if (IS_OPER(user))
+ if (user->HasPrivPermission("users/auspex"))
return 0;
/* user must be opered, boned. */
diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp
index ae479c902..7a2448afc 100644
--- a/src/modules/m_hideoper.cpp
+++ b/src/modules/m_hideoper.cpp
@@ -78,7 +78,16 @@ class ModuleHideOper : public Module
/* Dont display numeric 313 (RPL_WHOISOPER) if they have +H set and the
* person doing the WHOIS is not an oper
*/
- return ((!IS_OPER(user)) && (numeric == 313) && dest->IsModeSet('H'));
+ if (numeric != 313)
+ return 0;
+
+ if (!dest->IsModeSet('H'))
+ return 0;
+
+ if (user->HasPrivPermission("users/auspex"))
+ return 1;
+
+ return 0;
}
};