]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/mode.h
Made a load more stuff Extensible which might be of use to someone
[user/henk/code/inspircd.git] / include / mode.h
index 1c60678c5459f28d8539928a40ea106e98302e9f..8145ccd32d40da1025686858e6378b54d01ceecd 100644 (file)
@@ -69,7 +69,7 @@ enum ModeMasks {
  * mode is expected to have a parameter, then this is
  * equivalent to returning MODEACTION_DENY.
  */
-class ModeHandler
+class ModeHandler : public Extensible
 {
  protected:
        /**
@@ -189,7 +189,7 @@ class ModeHandler
  * 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
+class ModeWatcher : public Extensible
 {
  protected:
        /**
@@ -315,6 +315,24 @@ class ModeParser
         * @return True if the mode was successfully added.
         */
        bool AddMode(ModeHandler* mh, unsigned const char modeletter);
+       /**
+        * Add a mode watcher.
+        * A mode watcher is triggered before and after a mode handler is
+        * triggered. See the documentation of class ModeWatcher for more
+        * information.
+        * @param mw The ModeWatcher you want to add
+        * @return True if the ModeWatcher was added correctly
+        */
+       bool AddModeWatcher(ModeWatcher* mw);
+       /**
+        * Delete a mode watcher.
+        * A mode watcher is triggered before and after a mode handler is
+        * triggered. See the documentation of class ModeWatcher for more
+        * information.
+        * @param mw The ModeWatcher you want to delete
+        * @return True if the ModeWatcher was deleted correctly
+        */
+       bool DelModeWatcher(ModeWatcher* mw);
        /**
         * Process a set of mode changes from a server or user.
         * @param parameters The parameters of the mode change, in the format