]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/hashcomp.cpp
Add $ModDep: special comment, similar to $CompileFlags and $LinkerFlags.
[user/henk/code/inspircd.git] / src / hashcomp.cpp
index 2acd59f9196b95627b87ac3d1437b5faebd2fac3..e004940410c6860dd4531ce3c1f49d785cc76219 100644 (file)
@@ -217,6 +217,11 @@ const std::string irc::tokenstream::GetToken()
 
        while (n != tokens.end())
        {
+               /** Skip multi space, converting "  " into " "
+                */
+               while ((n+1 != tokens.end()) && (*n == ' ') && (*(n+1) == ' '))
+                       n++;
+
                if ((last_pushed) && (*n == ':'))
                {
                        /* If we find a token thats not the first and starts with :,
@@ -354,3 +359,30 @@ int irc::modestacker::GetStackedLine(std::deque<std::string> &result)
 
        return n;
 }
+
+irc::stringjoiner::stringjoiner(const std::string &seperator, const std::vector<std::string> &sequence, int begin, int end)
+{
+       for (int v = begin; v < end; v++)
+               joined.append(sequence[v]).append(seperator);
+       joined.append(sequence[end]);
+}
+
+irc::stringjoiner::stringjoiner(const std::string &seperator, const std::deque<std::string> &sequence, int begin, int end)
+{
+       for (int v = begin; v < end; v++)
+               joined.append(sequence[v]).append(seperator);
+       joined.append(sequence[end]);
+}
+
+irc::stringjoiner::stringjoiner(const std::string &seperator, const char** sequence, int begin, int end)
+{
+       for (int v = begin; v < end; v++)
+               joined.append(sequence[v]).append(seperator);
+       joined.append(sequence[end]);
+}
+
+std::string& irc::stringjoiner::GetJoined()
+{
+       return joined;
+}
+