]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/modules.h
More numerics.h conversion
[user/henk/code/inspircd.git] / include / modules.h
index 585bd98d9a89e8800bcd1ca45a31343f13704d06..772f4ab5f57310d9269ebc65e00c22db22c70f5d 100644 (file)
@@ -14,7 +14,6 @@
 #ifndef __MODULES_H
 #define __MODULES_H
 
-#include "globals.h"
 #include "dynamic.h"
 #include "base.h"
 #include "ctables.h"
@@ -392,8 +391,8 @@ enum Implementation
        I_OnDecodeMetaData, I_ProtoSendMode, I_ProtoSendMetaData, I_OnWallops, I_OnChangeHost, I_OnChangeName, I_OnAddLine,
        I_OnDelLine, I_OnExpireLine, I_OnCleanup, I_OnUserPostNick, I_OnAccessCheck, I_On005Numeric, I_OnKill, I_OnRemoteKill, I_OnLoadModule, I_OnUnloadModule,
        I_OnBackgroundTimer, I_OnPreCommand, I_OnCheckReady, I_OnCheckInvite, I_OnRawMode,
-       I_OnCheckKey, I_OnCheckLimit, I_OnCheckBan, I_OnStats, I_OnChangeLocalUserHost, I_OnChangeLocalUserGecos, I_OnLocalTopicChange,
-       I_OnPostLocalTopicChange, I_OnEvent, I_OnRequest, I_OnGlobalOper, I_OnPostConnect, I_OnAddBan, I_OnDelBan,
+       I_OnCheckKey, I_OnCheckLimit, I_OnCheckBan, I_OnCheckExtBan, I_OnCheckStringExtBan, I_OnStats, I_OnChangeLocalUserHost, I_OnChangeLocalUserGecos, 
+       I_OnLocalTopicChange, I_OnPostLocalTopicChange, I_OnEvent, I_OnRequest, I_OnGlobalOper, I_OnPostConnect, I_OnAddBan, I_OnDelBan,
        I_OnRawSocketAccept, I_OnRawSocketClose, I_OnRawSocketWrite, I_OnRawSocketRead, I_OnChangeLocalUserGECOS, I_OnUserRegister,
        I_OnChannelPreDelete, I_OnChannelDelete, I_OnPostOper, I_OnSyncOtherMetaData, I_OnSetAway, I_OnUserList,
        I_OnPostCommand, I_OnPostJoin, I_OnWhoisLine, I_OnBuildExemptList, I_OnRawSocketConnect, I_OnGarbageCollect, I_OnBufferFlushed,
@@ -498,11 +497,11 @@ class CoreExport Module : public Extensible
         * and the details of the channel they have left is available in the variable Channel *channel
         * @param user The user who is parting
         * @param channel The channel being parted
-        * @param partmessage The part message, or an empty string
+        * @param partmessage The part message, or an empty string (may be modified)
         * @param silent Change this to true if you want to conceal the PART command from the other users
         * of the channel (useful for modules such as auditorium)
         */
-       virtual void OnUserPart(User* user, Channel* channel, const std::string &partmessage, bool &silent);
+       virtual void OnUserPart(User* user, Channel* channel, std::string &partmessage, bool &silent);
 
        /** Called on rehash.
         * This method is called prior to a /REHASH or when a SIGHUP is received from the operating
@@ -1034,10 +1033,11 @@ class CoreExport Module : public Extensible
         * @param pcnt The nuimber of parameters passed to the command
         * @param user the user issuing the command
         * @param validated True if the command has passed all checks, e.g. it is recognised, has enough parameters, the user has permission to execute it, etc.
+        * You should only change the parameter list and command string if validated == false (e.g. before the command lookup occurs).
         * @param original_line The entire original line as passed to the parser from the user
         * @return 1 to block the command, 0 to allow
         */
-       virtual int OnPreCommand(const std::string &command, const std::vector<std::string>& parameters, User *user, bool validated, const std::string &original_line);
+       virtual int OnPreCommand(std::string &command, std::vector<std::string>& parameters, User *user, bool validated, const std::string &original_line);
 
        /** Called after any command has been executed.
         * This event occurs for all registered commands, wether they are registered in the core,
@@ -1132,6 +1132,19 @@ class CoreExport Module : public Extensible
         */
        virtual int OnCheckBan(User* user, Channel* chan);
 
+       /* Called whenever checking whether or not a user is matched by an applicable extended bantype.
+        * NOTE: may also trigger extra OnCheckStringExtBan events!
+        * @param u The user to check
+        * @param c The channel the user is on
+        * @param type The type of extended ban to check for.
+        */
+       virtual int OnCheckExtBan(User *u, Channel *c, char type);
+
+       /** Called whenever checking whether or not a string is extbanned. NOTE: one OnCheckExtBan will also trigger a number of
+        * OnCheckStringExtBan events for seperate host/IP comnbinations.
+        */
+       virtual int OnCheckStringExtBan(const std::string &s, Channel *c, char type);
+
        /** Called on all /STATS commands
         * This method is triggered for all /STATS use, including stats symbols handled by the core.
         * @param symbol the symbol provided to /STATS