X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fmode.h;h=d548ea8d73b4959fa8ef8aba86bfb26c8e3d0adb;hb=db0c7fae77b60857adf9dd083a1b6ce524a6808f;hp=b3c580e6cecf960148b54f45e4fb34ed48ca31d5;hpb=696ee9ff66bb94be2229bfa9c3dc288affc38a72;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/mode.h b/include/mode.h index b3c580e6c..d548ea8d7 100644 --- a/include/mode.h +++ b/include/mode.h @@ -90,7 +90,7 @@ typedef std::pair 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::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. */