X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fmode.h;h=c8a315cce85df14b129a002a472061fce56f055c;hb=5ee7322040d501fe55853453caa230f4550313c3;hp=8e5c105ceec0c53c068c45f5448aca64ba0e0c26;hpb=9cf56d917d92959701694477f7944d45ad2c38ed;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/mode.h b/include/mode.h index 8e5c105ce..c8a315cce 100644 --- a/include/mode.h +++ b/include/mode.h @@ -30,7 +30,9 @@ class InspIRCd; */ enum ModeType { + /** User mode */ MODETYPE_USER = 0, + /** Channel mode */ MODETYPE_CHANNEL = 1 }; @@ -64,8 +66,11 @@ enum ModeMasks */ enum PrefixModeValue { + /* +v */ VOICE_VALUE = 10000, + /* +h */ HALFOP_VALUE = 20000, + /* +o */ OP_VALUE = 30000 }; @@ -93,6 +98,9 @@ typedef std::pair ModePair; class CoreExport ModeHandler : public Extensible { protected: + /** + * Creator/owner pointer + */ InspIRCd* ServerInstance; /** * The mode letter you're implementing. @@ -220,9 +228,17 @@ class CoreExport ModeHandler : public Extensible * 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 - * @parameter channel The channel they're requesting an item list of (e.g. a banlist, or an exception list etc) + * @param channel The channel they're requesting an item list of (e.g. a banlist, or an exception list etc) */ virtual void DisplayList(userrec* user, chanrec* 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(userrec* user, chanrec* 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 @@ -282,6 +298,9 @@ class CoreExport ModeHandler : public Extensible class CoreExport ModeWatcher : public Extensible { protected: + /** + * Creator/owner pointer + */ InspIRCd* ServerInstance; /** * The mode letter this class is watching @@ -350,6 +369,9 @@ typedef std::vector::iterator ModeWatchIter; class CoreExport ModeParser : public classbase { private: + /** + * Creator/owner pointer + */ InspIRCd* ServerInstance; /** Mode handlers for each mode, to access a handler subtract * 65 from the ascii value of the mode letter. @@ -484,7 +506,7 @@ class CoreExport ModeParser : public classbase std::string ChanModes(); /** Used by this class internally during std::sort and 005 generation */ - static bool PrefixComparison(const prefixtype one, const prefixtype two); + static bool PrefixComparison(prefixtype one, prefixtype two); /** This returns the PREFIX=(ohv)@%+ section of the 005 numeric. */ @@ -502,3 +524,4 @@ class CoreExport ModeParser : public classbase }; #endif +