]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_noinvite.cpp
Moved a ton of functions into helperfuncs.h to speed up recompiles
[user/henk/code/inspircd.git] / src / modules / m_noinvite.cpp
index 7bd76d95cad8e15d05dd3ae042d16fbc55a24eef..868af242bb2fe6912cfeac32dc0bbac158f8c356 100644 (file)
@@ -18,6 +18,7 @@
 #include "users.h"
 #include "channels.h"
 #include "modules.h"
+#include "helperfuncs.h"
 
 /* $ModDesc: Provides support for unreal-style channel mode +V */
 
@@ -33,6 +34,25 @@ class ModuleNoInvite : public Module
                Srv->AddExtendedMode('V',MT_CHANNEL,false,0,0);
        }
 
+        virtual void On005Numeric(std::string &output)
+        {
+                std::stringstream line(output);
+                std::string temp1, temp2;
+                while (!line.eof())
+                {
+                        line >> temp1;
+                        if (temp1.substr(0,10) == "CHANMODES=")
+                        {
+                                // append the chanmode to the end
+                                temp1 = temp1.substr(10,temp1.length());
+                                temp1 = "CHANMODES=" + temp1 + "V";
+                        }
+                        temp2 = temp2 + temp1 + " ";
+                }
+               if (temp2.length())
+                       output = temp2.substr(0,temp2.length()-1);
+        }
+
 
        virtual int OnUserPreInvite(userrec* user,userrec* dest,chanrec* channel)
        {
@@ -64,7 +84,7 @@ class ModuleNoInvite : public Module
        
        virtual Version GetVersion()
        {
-               return Version(1,0,0,0);
+               return Version(1,0,0,0,VF_STATIC|VF_VENDOR);
        }
 };