git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4759
e03df62e-2008-0410-955e-
edbf42e46eb7
std::string command = tokens.GetToken();
while (((para[items] = tokens.GetToken()) != "") && (items < 127))
+ {
+ log(DEBUG,"Param: '%s'",para[items].c_str());
command_p[items] = para[items++].c_str();
+ }
std::transform(command.begin(), command.end(), command.begin(), ::toupper);
irc::tokenstream::tokenstream(const std::string &source) : tokens(source), last_pushed(false)
{
+ /* Remove trailing spaces, these muck up token parsing */
+ while (tokens.find_last_of(' ') == tokens.length() - 1)
+ tokens.erase(tokens.end() - 1);
+
+ /* Record starting position and current position */
last_starting_position = tokens.begin();
n = tokens.begin();
}