From f0debf907a36846e3b48767e9797880135a4583b Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Tue, 30 Aug 2016 16:05:01 +0200 Subject: Pass the ModeHandler to User::HasModePermission() Mark the method as const --- include/users.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'include') 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