+ }
+
+ virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line)
+ {
+ User *u = NULL;
+
+ /* If theyre not registered yet, we dont want
+ * to know.
+ */
+ if (user->registered != REG_ALL)
+ return 0;
+
+ /* We dont have any commands looking like this, dont bother with the loop */
+ if (AliasMap.find(command) == AliasMap.end())
+ return 0;
+
+ irc::string c = command.c_str();
+ /* The parameters for the command in their original form, with the command stripped off */
+ std::string compare = original_line.substr(command.length());
+ while (*(compare.c_str()) == ' ')
+ compare.erase(compare.begin());
+
+ std::string safe(original_line);
+
+ /* Escape out any $ symbols in the user provided text */
+
+ SearchAndReplace(safe, "$", "\r");