]> 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 047c55e7f9f292a3eefe0172b3365fa2d7ccdb4f..e9661c727cd0697148e8cae2ec76f13aecabc78e 100644 (file)
@@ -64,7 +64,7 @@ class BanRedirect : public ModeWatcher
                
                        if(adding && (channel->bans.size() > static_cast<unsigned>(maxbans)))
                        {
-                               source->WriteNumeric(478, "%s %s :Channel ban list for %s is full (maximum entries for this channel is %d)", source->nick, channel->name, channel->name, maxbans);
+                               source->WriteNumeric(478, "%s %s :Channel ban list for %s is full (maximum entries for this channel is %ld)", source->nick, channel->name, channel->name, maxbans);
                                return false;
                        }
                        
@@ -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)