]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_banredirect.cpp
Increase the size of the matrix for map drawing to 250x250
[user/henk/code/inspircd.git] / src / modules / m_banredirect.cpp
index 5965811c446669e6fdeaf666c201561f4a0f390a..80beaa450425da9c15138d2245294864e6224265 100644 (file)
@@ -62,6 +62,9 @@ class BanRedirect : public ModeWatcher
                        std::string::iterator start_pos = param.begin();
                        long maxbans = channel->GetMaxBans();
 
+                       if (param.length() >= 2 && param[1] == ':')
+                               return true;
+
                        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 %ld)", source->nick.c_str(), channel->name.c_str(), channel->name.c_str(), maxbans);
@@ -295,8 +298,12 @@ class ModuleBanRedirect : public Module
                                        {
                                                /* tell them they're banned and are being transferred */
                                                Channel* destchan = ServerInstance->FindChan(redir->targetchan);
+                                               std::string destlimit;
+
+                                               if (destchan)
+                                                       destlimit = destchan->GetModeParameter('l');
 
-                                               if(destchan && ServerInstance->Modules->Find("m_redirect.so") && destchan->IsModeSet('L') && destchan->limit && (destchan->GetUserCounter() >= destchan->limit))
+                                               if(destchan && ServerInstance->Modules->Find("m_redirect.so") && destchan->IsModeSet('L') && !destlimit.empty() && (destchan->GetUserCounter() >= atoi(destlimit.c_str())))
                                                {
                                                        user->WriteNumeric(474, "%s %s :Cannot join channel (You are banned)", user->nick.c_str(), chan->name.c_str());
                                                        return 1;