+ /**
+ * Returns the mode character this handler handles.
+ * @return The mode character
+ */
+ inline char GetModeChar() { return mode; }
+
+ /** For user modes, return the current parameter, if any
+ */
+ virtual std::string GetUserParameter(User* useor);
+
+ /**
+ * Called when a channel mode change access check for your mode occurs.
+ * @param source Contains the user setting the mode.
+ * @param channel contains the destination channel the modes are being set on.
+ * @param parameter The parameter for your mode. This is modifiable.
+ * @param adding This value is true when the mode is being set, or false when it is being unset.
+ * @return allow, deny, or passthru to check against the required level
+ */
+ virtual ModResult AccessCheck(User* source, Channel* channel, std::string ¶meter, bool adding);
+
+ /**
+ * Called when a mode change for your mode occurs.
+ * @param source Contains the user setting the mode.
+ * @param dest For usermodes, contains the destination user the mode is being set on. For channelmodes, this is an undefined value.
+ * @param channel For channel modes, contains the destination channel the modes are being set on. For usermodes, this is an undefined value.
+ * @param parameter The parameter for your mode, if you indicated that your mode requires a parameter when being set or unset. Note that
+ * if you alter this value, the new value becomes the one displayed and send out to the network, also, if you set this to an empty string
+ * but you specified your mode REQUIRES a parameter, this is equivalent to returning MODEACTION_DENY and will prevent the mode from being
+ * displayed.
+ * @param adding This value is true when the mode is being set, or false when it is being unset.
+ * @return MODEACTION_ALLOW to allow the mode, or MODEACTION_DENY to prevent the mode, also see the description of 'parameter'.
+ */
+ virtual ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding); /* Can change the mode parameter as its a ref */
+ /**
+ * If your mode is a listmode, then this method will be called for displaying an item list, e.g. on MODE #channel +modechar
+ * without any parameter or other modes in the command.
+ * @param user The user issuing the command
+ * @param channel The channel they're requesting an item list of (e.g. a banlist, or an exception list etc)
+ */
+ virtual void DisplayList(User* user, Channel* channel);
+
+ /** In the event that the mode should be given a parameter, and no parameter was provided, this method is called.
+ * This allows you to give special information to the user, or handle this any way you like.
+ * @param user The user issuing the mode change
+ * @param dest For user mode changes, the target of the mode. For channel mode changes, NULL.
+ * @param channel For channel mode changes, the target of the mode. For user mode changes, NULL.
+ */
+ virtual void OnParameterMissing(User* user, User* dest, Channel* channel);
+
+ /**
+ * If your mode is a listmode, this method will be called to display an empty list (just the end of list numeric)
+ * @param user The user issuing the command
+ * @param channel The channel tehy're requesting an item list of (e.g. a banlist, or an exception list etc)
+ */
+ virtual void DisplayEmptyList(User* user, Channel* channel);
+
+ /**
+ * If your mode needs special action during a server sync to determine which side wins when comparing timestamps,
+ * override this function and use it to return true or false. The default implementation just returns true if
+ * theirs < ours. This will only be called for non-listmodes with parameters, when adding the mode and where
+ * theirs == ours (therefore the default implementation will always return false).
+ * @param their_param Their parameter if the mode has a parameter
+ * @param our_param Our parameter if the mode has a parameter
+ * @param channel The channel we are checking against
+ * @return True if the other side wins the merge, false if we win the merge for this mode.
+ */
+ virtual bool ResolveModeConflict(std::string &their_param, const std::string &our_param, Channel* channel);
+
+ /**
+ * When a MODETYPE_USER mode handler is being removed, the server will call this method for every user on the server.
+ * Your mode handler should remove its user mode from the user by sending the appropriate server modes using
+ * InspIRCd::SendMode(). The default implementation of this method can remove simple modes which have no parameters,
+ * and can be used when your mode is of this type, otherwise you must implement a more advanced version of it to remove
+ * your mode properly from each user.
+ * @param user The user which the server wants to remove your mode from
+ */
+ virtual void RemoveMode(User* user, irc::modestacker* stack = NULL);