]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/base.h
Improve behaviour when running as root.
[user/henk/code/inspircd.git] / include / base.h
index ec95342fcd2909882d75c7ab0a828b24ec5eea5c..d8781f7969a1f21f3b8d61b6eecff846cf2204e0 100644 (file)
@@ -202,7 +202,7 @@ class CoreExport CoreException : public std::exception
         * Actually no, it does nothing. Never mind.
         * @throws Nothing!
         */
-       virtual ~CoreException() throw() {};
+       virtual ~CoreException() throw() {}
        /** Returns the reason for the exception.
         * @return Human readable description of the error
         */
@@ -235,7 +235,9 @@ enum ServiceType {
        /** is a data processing provider (MD5, SQL) */
        SERVICE_DATA,
        /** is an I/O hook provider (SSL) */
-       SERVICE_IOHOOK
+       SERVICE_IOHOOK,
+       /** Service managed by a module */
+       SERVICE_CUSTOM
 };
 
 /** A structure defining something that a module can provide */
@@ -251,8 +253,11 @@ class CoreExport ServiceProvider : public classbase
        ServiceProvider(Module* Creator, const std::string& Name, ServiceType Type);
        virtual ~ServiceProvider();
 
+       /** Register this service in the appropriate registrar
+        */
+       virtual void RegisterService();
+
        /** If called, this ServiceProvider won't be registered automatically
         */
        void DisableAutoRegister();
 };
-