* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
/* convert a string to lowercase. Note following special circumstances
* taken from RFC 1459. Many "official" server branches still hold to this
* rule so i will too;
/* convert a string to lowercase. Note following special circumstances
* taken from RFC 1459. Many "official" server branches still hold to this
* rule so i will too;
- unsigned char* n1 = (unsigned char*)s1.c_str();
- unsigned char* n2 = (unsigned char*)s2.c_str();
+ const unsigned char* n1 = (const unsigned char*)s1.c_str();
+ const unsigned char* n2 = (const unsigned char*)s2.c_str();
for (; *n1 && *n2; n1++, n2++)
if (lowermap[*n1] != lowermap[*n2])
return false;
for (; *n1 && *n2; n1++, n2++)
if (lowermap[*n1] != lowermap[*n2])
return false;
- while ((strip.length()) && (strip.find_last_of(sep) == strip.length() - 1))
- strip.erase(strip.end() - 1);
+ while ((token.length()) && (token.find_last_of(sep) == token.length() - 1))
+ token.erase(token.end() - 1);
+
+ if (token.empty())
+ n++;
/* EWW! This used to be using sprintf, which is WAY inefficient. -Special */
const char *hex = "0123456789abcdef";
/* EWW! This used to be using sprintf, which is WAY inefficient. -Special */
const char *hex = "0123456789abcdef";
-irc::stringjoiner::stringjoiner(const std::string &seperator, const char** sequence, int begin, int end)
+irc::stringjoiner::stringjoiner(const std::string &seperator, const char* const* sequence, int begin, int end)