]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/users.h
Pass the ModeHandler to User::HasModePermission()
[user/henk/code/inspircd.git] / include / users.h
index b97c62d4aa91a2fea09f8befd3426951a417818d..ae76d2eb3a3ffa18948bf460fd1e0175bd40596e 100644 (file)
@@ -455,11 +455,10 @@ class CoreExport User : public Extensible
        /** Returns true or false if a user can set a privileged user or channel mode.
         * This is done by looking up their oper type from User::oper, then referencing
         * this to their oper classes, and checking the modes they can set.
-        * @param mode The mode the check
-        * @param type ModeType (MODETYPE_CHANNEL or MODETYPE_USER).
+        * @param mh Mode to check
         * @return True if the user can set or unset this mode.
         */
-       virtual bool HasModePermission(unsigned char mode, ModeType type);
+       virtual bool HasModePermission(const ModeHandler* mh) const;
 
        /** Creates a usermask with real host.
         * Takes a buffer to use and fills the given buffer with the hostmask in the format user\@host
@@ -864,11 +863,10 @@ class CoreExport LocalUser : public User, public insp::intrusive_list_node<Local
        /** Returns true or false if a user can set a privileged user or channel mode.
         * This is done by looking up their oper type from User::oper, then referencing
         * this to their oper classes, and checking the modes they can set.
-        * @param mode The mode the check
-        * @param type ModeType (MODETYPE_CHANNEL or MODETYPE_USER).
+        * @param mh Mode to check
         * @return True if the user can set or unset this mode.
         */
-       bool HasModePermission(unsigned char mode, ModeType type);
+       bool HasModePermission(const ModeHandler* mh) const;
 };
 
 class RemoteUser : public User