-bool irc::tokenstream::GetToken(long &token)
-{
- std::string tok;
- bool returnval = GetToken(tok);
- token = ConvToInt(tok);
- return returnval;
+ // If this is true then we have a <trailing> token!
+ if (message[position] == ':')
+ {
+ token.assign(message, position + 1, std::string::npos);
+ position = message.length();
+ return true;
+ }
+
+ // There is no <trailing> token so it must be a <middle> token.
+ return GetMiddle(token);