]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_banredirect.cpp
Check for windows drive letters on the start of paths and treat them the same as...
[user/henk/code/inspircd.git] / src / modules / m_banredirect.cpp
index bb59cde3db36b9fc3fbb8cfbb666b97a7d63204c..e9661c727cd0697148e8cae2ec76f13aecabc78e 100644 (file)
@@ -222,9 +222,8 @@ class ModuleBanRedirect : public Module
                        {
                                irc::modestacker modestack(false);
                                StringDeque stackresult;
-                               const char* mode_junk[MAXMODES+2];
-                               
-                               mode_junk[0] = chan->name;
+                               std::vector<std::string> mode_junk;
+                               mode_junk.push_back(chan->name);
                                
                                for(BanRedirectList::iterator i = redirects->begin(); i != redirects->end(); i++)
                                {
@@ -241,10 +240,10 @@ class ModuleBanRedirect : public Module
                                {
                                        for(StringDeque::size_type i = 0; i < stackresult.size(); i++)
                                        {
-                                               mode_junk[i+1] = stackresult[i].c_str();
+                                               mode_junk.push_back(stackresult[i]);
                                        }
                                        
-                                       ServerInstance->SendMode(mode_junk, stackresult.size() + 1, ServerInstance->FakeClient);
+                                       ServerInstance->SendMode(mode_junk, ServerInstance->FakeClient);
                                }
                                
                                delete redirects;
@@ -258,7 +257,7 @@ class ModuleBanRedirect : public Module
                ExceptionModule = ServerInstance->Modules->Find("m_banexception.so");
        }
 
-       virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
+       virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
        {
                /* This prevents recursion when a user sets multiple ban redirects in a chain
                 * (thanks Potter)