diff options
author | Attila Molnar <attilamolnar@hush.com> | 2016-08-30 16:05:01 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2016-08-30 16:05:01 +0200 |
commit | f0debf907a36846e3b48767e9797880135a4583b (patch) | |
tree | c2130bb47a303e4f253b8adb6dd15fa43f8e943d /include/users.h | |
parent | f899ea2786e2ccf1b5765efd68c99273c9c056a9 (diff) |
Pass the ModeHandler to User::HasModePermission()
Mark the method as const
Diffstat (limited to 'include/users.h')
-rw-r--r-- | include/users.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/include/users.h b/include/users.h index b97c62d4a..ae76d2eb3 100644 --- a/include/users.h +++ b/include/users.h @@ -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 |