]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
OnRawMode event makes a return: This was removed post 1.0 because it was incredibly...
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 6 Jan 2008 21:04:56 +0000 (21:04 +0000)
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 6 Jan 2008 21:04:56 +0000 (21:04 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8653 e03df62e-2008-0410-955e-edbf42e46eb7

include/modules.h
src/modules.cpp

index 250613c9b8b444da920945ed56fe0aeb699a9098..eab968e7ac844975fbd2d595a49a7191fdaa8569 100644 (file)
@@ -395,7 +395,7 @@ enum Implementation
        I_OnGetServerDescription, I_OnSyncUser, I_OnSyncChannel, I_OnSyncChannelMetaData, I_OnSyncUserMetaData,
        I_OnDecodeMetaData, I_ProtoSendMode, I_ProtoSendMetaData, I_OnWallops, I_OnChangeHost, I_OnChangeName, I_OnAddLine,
        I_OnDelLine, I_OnCleanup, I_OnUserPostNick, I_OnAccessCheck, I_On005Numeric, I_OnKill, I_OnRemoteKill, I_OnLoadModule, I_OnUnloadModule,
-       I_OnBackgroundTimer, I_OnPreCommand, I_OnCheckReady, I_OnUserRrgister, I_OnCheckInvite,
+       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_OnOperCompre, I_OnGlobalOper, I_OnPostConnect, I_OnAddBan, I_OnDelBan,
        I_OnRawSocketAccept, I_OnRawSocketClose, I_OnRawSocketWrite, I_OnRawSocketRead, I_OnChangeLocalUserGECOS, I_OnUserRegister,
@@ -1085,6 +1085,18 @@ class CoreExport Module : public Extensible
         */
        virtual int OnCheckInvite(User* user, Channel* chan);
 
+       /** Called whenever a mode character is processed.
+        * Return 1 from this function to block the mode character from being processed entirely.
+        * @param user The user who is sending the mode
+        * @param chan The channel the mode is being sent to (or NULL if a usermode)
+        * @param mode The mode character being set
+        * @param param The parameter for the mode or an empty string
+        * @param adding true of the mode is being added, false if it is being removed
+        * @param pcnt The parameter count for the mode (0 or 1)
+        * @return 1 to deny the mode, 0 to allow
+        */
+       virtual int OnRawMode(User* user, Channel* chan, char mode, const std::string &param, bool adding, int pcnt);
+
        /** Called whenever a user joins a channel, to determine if key checks should go ahead or not.
         * This method will always be called for each join, wether or not the channel is actually +k, and
         * determines the outcome of an if statement around the whole section of key checking code.
index 87fd393f84d8daabe9d2b37a65cea01c49417c19..36f0eb2e5a678195b45d1a27bdddb1443bf9541b 100644 (file)
@@ -140,6 +140,7 @@ bool                Module::OnCheckReady(User*) { return true; }
 int            Module::OnUserRegister(User*) { return 0; }
 int            Module::OnUserPreKick(User*, User*, Channel*, const std::string&) { return 0; }
 void           Module::OnUserKick(User*, User*, Channel*, const std::string&, bool&) { }
+int            Module::OnRawMode(User*, Channel*, char, const std::string &, bool, int) { return 0; }
 int            Module::OnCheckInvite(User*, Channel*) { return 0; }
 int            Module::OnCheckKey(User*, Channel*, const std::string&) { return 0; }
 int            Module::OnCheckLimit(User*, Channel*) { return 0; }