X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fmode.h;h=e15ddeeb0bd416d5022b1d28252ea3d16a2c5ad6;hb=8c2d96013084de950e3a63be4ae6ed626c4093ab;hp=ca610e46a0f28157dca75f3d57030d4ffb9f017f;hpb=dd36852a52e8541306b76c5b88bce8ab9b36654c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/mode.h b/include/mode.h index ca610e46a..e15ddeeb0 100644 --- a/include/mode.h +++ b/include/mode.h @@ -14,6 +14,11 @@ #ifndef __MODE_H #define __MODE_H +/* Forward declarations. */ +class User; + +#include "channels.h" + /** * Holds the values for different type of modes * that can exist, USER or CHANNEL type. @@ -271,7 +276,7 @@ class CoreExport ModeHandler : public Extensible * your mode properly from each user. * @param user The user which the server wants to remove your mode from */ - virtual void RemoveMode(User* user); + virtual void RemoveMode(User* user, irc::modestacker* stack = NULL); /** * When a MODETYPE_CHANNEL mode handler is being removed, the server will call this method for every channel on the server. @@ -281,7 +286,7 @@ class CoreExport ModeHandler : public Extensible * your mode properly from each channel. Note that in the case of listmodes, you should remove the entire list of items. * @param channel The channel which the server wants to remove your mode from */ - virtual void RemoveMode(Channel* channel); + virtual void RemoveMode(Channel* channel, irc::modestacker* stack = NULL); char GetNeededPrefix(); @@ -515,9 +520,11 @@ class CoreExport ModeParser : public classbase * similar purposes. * @param user The username to look up * @param channel The channel name to look up the privilages of the user for + * @param nick_suffix true (the default) if you want nicknames in the mode string, for easy + * use with the mode stacker, false if you just want the "avh" part of "avh nick nick nick". * @return The mode string. */ - std::string ModeString(User* user, Channel* channel); + std::string ModeString(User* user, Channel* channel, bool nick_suffix = true); }; #endif