]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/helperfuncs.cpp
Rewrite the m_cgiirc configuration handling.
[user/henk/code/inspircd.git] / src / helperfuncs.cpp
index 6217eb20ba2139ca4e2dfe725a996aa55c2ee0b4..8bb81481ef6807d3e22ada43f290c9db434388a4 100644 (file)
@@ -128,7 +128,7 @@ void InspIRCd::StripColor(std::string &sentence)
                        seq = 0;
 
                // Strip all control codes too except \001 for CTCP
-               if (seq || ((*i < 32) && (*i != 1)))
+               if (seq || ((*i >= 0) && (*i < 32) && (*i != 1)))
                        i = sentence.erase(i);
                else
                        ++i;
@@ -430,28 +430,3 @@ void GenRandomHandler::Call(char *output, size_t max)
                output[i] = random();
 #endif
 }
-
-ModResult OnCheckExemptionHandler::Call(User* user, Channel* chan, const std::string& restriction)
-{
-       unsigned int mypfx = chan->GetPrefixValue(user);
-       char minmode = 0;
-       std::string current;
-
-       irc::spacesepstream defaultstream(ServerInstance->Config->ConfValue("options")->getString("exemptchanops"));
-
-       while (defaultstream.GetToken(current))
-       {
-               std::string::size_type pos = current.find(':');
-               if (pos == std::string::npos)
-                       continue;
-               if (!current.compare(0, pos, restriction))
-                       minmode = current[pos+1];
-       }
-
-       PrefixMode* mh = ServerInstance->Modes->FindPrefixMode(minmode);
-       if (mh && mypfx >= mh->GetPrefixRank())
-               return MOD_RES_ALLOW;
-       if (mh || minmode == '*')
-               return MOD_RES_DENY;
-       return MOD_RES_PASSTHRU;
-}