]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/mode.h
Fix double printing of 'setting log file' and 'setting config file' paths.
[user/henk/code/inspircd.git] / include / mode.h
index b3c580e6cecf960148b54f45e4fb34ed48ca31d5..d548ea8d73b4959fa8ef8aba86bfb26c8e3d0adb 100644 (file)
@@ -90,7 +90,7 @@ 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:
        InspIRCd* ServerInstance;
@@ -132,6 +132,10 @@ class ModeHandler : public Extensible
         */
        char prefix;
 
+       /** Number of items with this mode set on them
+        */
+       unsigned int count;
+
  public:
        /**
         * The constructor for ModeHandler initalizes the mode handler.
@@ -164,6 +168,12 @@ class ModeHandler : public Extensible
         * value for this mode prefix.
         */
        char GetPrefix();
+       /** Get number of items with this mode set on them
+        */
+       virtual unsigned int GetCount();
+       /** Adjust usage count returned by GetCount
+        */
+       virtual void ChangeCount(int modifier);
        /**
         * Get the 'value' of this modes prefix.
         * determines which to display when there are multiple.
@@ -269,7 +279,7 @@ 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:
        InspIRCd* ServerInstance;
@@ -337,7 +347,7 @@ 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:
        InspIRCd* ServerInstance;
@@ -474,7 +484,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.
         */