+ * @param stack The mode stack to add the mode change to
+ */
+ virtual void RemoveMode(Channel* channel, irc::modestacker& stack);
+
+ inline unsigned int GetLevelRequired() const { return levelrequired; }
+
+ friend class ModeParser;
+};
+
+/**
+ * Prefix modes are channel modes that grant a specific rank to members having prefix mode set.
+ * They require a parameter when setting and unsetting; the parameter is always a member of the channel.
+ * A prefix mode may be set on any number of members on a channel, but for a given member a given prefix
+ * mode is either set or not set, in other words members cannot have the same prefix mode set more than once.
+ *
+ * A rank of a member is defined as the rank given by the 'strongest' prefix mode that member has.
+ * Other parts of the IRCd use this rank to determine whether a channel action is allowable for a user or not.
+ * The rank of a prefix mode is constant, i.e. the same rank value is given to all users having that prefix mode set.
+ *
+ * Note that it is possible that the same action requires a different rank on a different channel;
+ * for example changing the topic on a channel having +t set requires a rank that is >= than the rank of a halfop,
+ * but there is no such restriction when +t isn't set.
+ */
+class CoreExport PrefixMode : public ModeHandler
+{
+ protected:
+ /** The prefix character granted by this mode. '@' for op, '+' for voice, etc.
+ * If 0, this mode does not have a visible prefix character.
+ */
+ char prefix;
+
+ /** The prefix rank of this mode, used to compare prefix
+ * modes
+ */
+ unsigned int prefixrank;
+
+ public:
+ /**
+ * Constructor
+ * @param Creator The module creating this mode
+ * @param Name The user-friendly one word name of the prefix mode, e.g.: "op", "voice"
+ * @param ModeLetter The mode letter of this mode