]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/inspircd.h
Fix bug #83
[user/henk/code/inspircd.git] / include / inspircd.h
index 16281f2cc8f2668f0d6cf63d1d44ddba3404cca3..9568750c2db84513ec26b1b736460d82e45cfd31 100644 (file)
@@ -77,7 +77,6 @@ CoreExport extern InspIRCd* ServerInstance;
 #include "socketengine.h"
 #include "snomasks.h"
 #include "filelogger.h"
-#include "caller.h"
 #include "modules.h"
 #include "threadengine.h"
 #include "configreader.h"
@@ -228,7 +227,7 @@ class serverstats
         */
        serverstats()
                : statsAccept(0), statsRefused(0), statsUnknown(0), statsCollisions(0), statsDns(0),
-               statsDnsGood(0), statsDnsBad(0), statsConnects(0), statsSent(0.0), statsRecv(0.0)
+               statsDnsGood(0), statsDnsBad(0), statsConnects(0), statsSent(0), statsRecv(0)
        {
        }
 };
@@ -240,6 +239,7 @@ DEFINE_HANDLER1(FloodQuitUserHandler, void, User*);
 DEFINE_HANDLER2(IsChannelHandler, bool, const char*, size_t);
 DEFINE_HANDLER1(IsSIDHandler, bool, const std::string&);
 DEFINE_HANDLER1(RehashHandler, void, const std::string&);
+DEFINE_HANDLER3(OnCheckExemptionHandler, ModResult, User*, Channel*, const std::string&);
 
 /** The main class of the irc server.
  * This class contains instances of all the other classes in this software.
@@ -308,6 +308,7 @@ class CoreExport InspIRCd
        IsNickHandler HandleIsNick;
        IsIdentHandler HandleIsIdent;
        FloodQuitUserHandler HandleFloodQuitUser;
+       OnCheckExemptionHandler HandleOnCheckExemption;
        IsChannelHandler HandleIsChannel;
        IsSIDHandler HandleIsSID;
        RehashHandler HandleRehash;
@@ -327,6 +328,8 @@ class CoreExport InspIRCd
         */
        std::string GetUID();
 
+       static const char LogHeader[];
+
        /** Find a user in the UUID hash
         * @param nick The nickname to find
         * @return A pointer to the user, or NULL if the user does not exist
@@ -734,7 +737,7 @@ class CoreExport InspIRCd
        /** Returns the full version string of this ircd
         * @return The version string
         */
-       std::string GetVersionString();
+       std::string GetVersionString(bool rawversion = false);
 
        /** Attempt to write the process id to a given file
         * @param filename The PID file to attempt to write to
@@ -782,6 +785,13 @@ class CoreExport InspIRCd
         */
        caller1<void, User*> FloodQuitUser;
 
+       /** Called to check whether a channel restriction mode applies to a user
+        * @param User that is attempting some action
+        * @param Channel that the action is being performed on
+        * @param Action name
+        */
+       caller3<ModResult, User*, Channel*, const std::string&> OnCheckExemption;
+
        /** Restart the server.
         * This function will not return. If an error occurs,
         * it will throw an instance of CoreException.