]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands.cpp
Remove trailing spaces from input in irc::ircsepstream
[user/henk/code/inspircd.git] / src / commands.cpp
index bcdf4971d8a970b738973ab589e4805d653bec8c..2e4ae0d8f29bfc800046e1c112ac28090e0aec34 100644 (file)
@@ -85,7 +85,7 @@ void split_chlist(userrec* user, userrec* dest, const std::string &cl)
        prefix << ":" << Config->ServerName << " 319 " << user->nick << " " << dest->nick << " :";
        line = prefix.str();
        
-       for (start = 0; pos = cl.find(' ', start); start = pos+1)
+       for (start = 0; (pos = cl.find(' ', start)) != std::string::npos; start = pos+1)
        {
                length = (pos == std::string::npos) ? cl.length() : pos;
                
@@ -239,7 +239,7 @@ bool ip_matches_everyone(const std::string &ip, userrec* user)
        
        for (user_hash::iterator u = clientlist.begin(); u != clientlist.end(); u++)
        {
-               if (match(u->second->GetIPString(),ip.c_str()))
+               if (match(u->second->GetIPString(),ip.c_str(),true))
                        matches++;
        }