+ // nor do we give a shit about the prefix
+ fcommand.erase(fcommand.begin());
+
+ std::multimap<irc::string, Alias>::iterator i = Aliases.find(fcommand);
+
+ if (i == Aliases.end())
+ return;
+
+ /* Avoid iterating on to other aliases if no patterns match */
+ std::multimap<irc::string, Alias>::iterator upperbound = Aliases.upper_bound(fcommand);
+
+
+ /* The parameters for the command in their original form, with the command stripped off */
+ std::string compare = text.substr(fcommand.length() + 1);
+ while (*(compare.c_str()) == ' ')
+ compare.erase(compare.begin());
+
+ while (i != upperbound)
+ {
+ if (i->second.ChannelCommand)
+ {
+ // We use substr(1) here to remove the fantasy prefix
+ if (DoAlias(user, c, &(i->second), compare, text.substr(1)))
+ return;
+ }
+
+ i++;
+ }