+
+ /* Special variables */
+ SearchAndReplace(newline, "$nick", user->nick);
+ SearchAndReplace(newline, "$ident", user->ident);
+ SearchAndReplace(newline, "$host", user->host);
+ SearchAndReplace(newline, "$vhost", user->dhost);
+
+ irc::tokenstream ss(newline);
+ const char* parv[127];
+ int x = 0;
+
+ while ((pars[x] = ss.GetToken()) != "")
+ {
+ parv[x] = pars[x].c_str();
+ ServerInstance->Log(DEBUG,"Parameter %d: %s", x, parv[x]);
+ x++;
+ }
+
+ ServerInstance->Log(DEBUG,"Call command handler on %s", parv[0]);
+
+ if (ServerInstance->Parser->CallHandler(parv[0], &parv[1], x-1, user) == CMD_INVALID)
+ {
+ ServerInstance->Log(DEBUG,"Unknown command or not enough parameters");
+ }
+ else
+ {
+ ServerInstance->Log(DEBUG,"Command handler called successfully.");
+ }
+ }