]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chanprotect.cpp
Decide that it wasn't quite appropriate :(
[user/henk/code/inspircd.git] / src / modules / m_chanprotect.cpp
index 6f12566d0a4ee750ed47bc125a3ebb1fabd9ae07..86f6876ae2e3d016c26421d63773a30e7612f288 100644 (file)
@@ -61,21 +61,7 @@ class ModuleChanProtect : public Module
        
         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=qa" + temp1;
-                        }
-                        temp2 = temp2 + temp1 + " ";
-                }
-               if (temp2.length())
-                       output = temp2.substr(0,temp2.length()-1);
+               InsertMode(output,"qa",1);
         }
 
        virtual void OnUserKick(userrec* source, userrec* user, chanrec* chan, std::string reason)
@@ -85,7 +71,7 @@ class ModuleChanProtect : public Module
                user->Shrink("cm_protect_"+std::string(chan->name));
        }
 
-       virtual void OnUserPart(userrec* user, chanrec* channel)
+       virtual void OnUserPart(userrec* user, chanrec* channel, std::string partreason)
        {
                // FIX: when someone parts a channel we must remove their Extensibles!
                user->Shrink("cm_founder_"+std::string(channel->name));