summaryrefslogtreecommitdiff
path: root/include/users.h
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-30 14:40:03 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-30 14:40:03 +0000
commit2977a23070faaddc9972b2ce6f22452be471b12e (patch)
tree713f6264531fe5cb8e5d297abce3180981d267f5 /include/users.h
parenta89b0ed42d90f714e4fa01265f5cd4995686ba82 (diff)
Added support for HasPermission method
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@755 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/users.h')
-rw-r--r--include/users.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/users.h b/include/users.h
index c1a6aa3af..741e94dfb 100644
--- a/include/users.h
+++ b/include/users.h
@@ -136,6 +136,13 @@ class userrec : public connection
* will be disconnected
*/
unsigned long timeout;
+
+ /** The oper type they logged in as, if they are an oper.
+ * This is used to check permissions in operclasses, so that
+ * we can say 'yay' or 'nay' to any commands they issue.
+ * The value of this is the value of a valid 'type name=' tag.
+ */
+ char oper[NICKMAX];
userrec();
@@ -168,6 +175,12 @@ class userrec : public connection
*/
virtual void RemoveInvite(char* channel);
+ /** Returns true or false for if a user can execute a privilaged oper command.
+ * This is done by looking up their oper type from userrec::oper, then referencing
+ * this to their oper classes and checking the commands they can execute.
+ */
+ virtual bool HasPermission(char* command);
+
};