]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/mode.h
Add a metric assload of TRANSLATE macros to modules.
[user/henk/code/inspircd.git] / include / mode.h
index 2875d853ea72af62c272c7602962b407e8b1d064..c8a315cce85df14b129a002a472061fce56f055c 100644 (file)
@@ -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
 };
 
@@ -90,9 +95,12 @@ typedef std::pair<bool,std::string> ModePair;
  * mode is expected to have a parameter, then this is
  * equivalent to returning MODEACTION_DENY.
  */
-class ModeHandler : public Extensible
+class CoreExport ModeHandler : public Extensible
 {
  protected:
+       /**
+        * Creator/owner pointer
+        */
        InspIRCd* ServerInstance;
        /**
         * The mode letter you're implementing.
@@ -220,9 +228,17 @@ class 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
@@ -279,9 +295,12 @@ class ModeHandler : public Extensible
  * and attach it to the mode using Server::AddModeWatcher and Server::DelModeWatcher.
  * A ModeWatcher will be called both before and after the mode change.
  */
-class ModeWatcher : public Extensible
+class CoreExport ModeWatcher : public Extensible
 {
  protected:
+       /**
+        * Creator/owner pointer
+        */
        InspIRCd* ServerInstance;
        /**
         * The mode letter this class is watching
@@ -347,9 +366,12 @@ typedef std::vector<ModeWatcher*>::iterator ModeWatchIter;
  * parses client to server MODE strings for user and channel modes, and performs
  * processing for the 004 mode list numeric, amongst other things.
  */
-class ModeParser : public classbase
+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 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 ModeParser : public classbase
 };
 
 #endif
+