+ return 0;
+ }
+
+ void DoCommand(std::string newline, userrec* user, const std::string &original_line)
+ {
+ for (int v = 1; v < 10; v++)
+ {
+ std::string var = "$";
+ var.append(ConvToStr(v));
+ var.append("-");
+ std::string::size_type x = newline.find(var);
+
+ while (x != std::string::npos)
+ {
+ newline.erase(x, var.length());
+ newline.insert(x, GetVar(var, original_line));
+ x = newline.find(var);
+ }
+
+ var = "$";
+ var.append(ConvToStr(v));
+ x = newline.find(var);
+
+ while (x != std::string::npos)
+ {
+ newline.erase(x, var.length());
+ newline.insert(x, GetVar(var, original_line));
+ x = newline.find(var);
+ }
+ }
+
+ /* Special variables */
+ SearchAndReplace(newline, "$nick", user->nick);
+ SearchAndReplace(newline, "$ident", user->ident);
+ SearchAndReplace(newline, "$host", user->host);
+ SearchAndReplace(newline, "$vhost", user->dhost);
+
+ /* Unescape any variable names in the user text before sending */
+ SearchAndReplace(newline, "\r", "$");
+
+ irc::tokenstream ss(newline);
+ const char* parv[127];
+ int x = 0;
+
+ while (ss.GetToken(pars[x]))
+ {
+ parv[x] = pars[x].c_str();
+ x++;
+ }
+
+ ServerInstance->Parser->CallHandler(parv[0], &parv[1], x-1, user);
+ }
+
+ virtual void OnRehash(userrec* user, const std::string ¶meter)