- std::vector<std::string>::iterator it;
- if ((it = std::find(data->wanted.begin(), data->wanted.end(), "multi-prefix")) != data->wanted.end())
- {
- // we can handle this, so ACK it, and remove it from the wanted list
- data->ack.push_back(*it);
- data->wanted.erase(it);
- data->user->Extend("NAMESX",dummy);
- }
- }
+ // Channel names can contain ":", and ":" as a 'start-of-token' delimiter is
+ // only ever valid after whitespace, so... find the actual delimiter first!
+ // Thanks to FxChiP for pointing this out.
+ std::string::size_type pos = line.find(" :");
+ if (pos == std::string::npos || pos == 0)
+ return;
+ pos--;
+ // Don't do anything if the user has no prefixes
+ if ((line[pos] == 'H') || (line[pos] == 'G') || (line[pos] == '*'))
+ return;