+ return word;
+ }
+
+ ModResult OnPreCommand(std::string &command, std::vector<std::string> ¶meters, LocalUser *user, bool validated, const std::string &original_line) CXX11_OVERRIDE
+ {
+ /* If theyre not registered yet, we dont want
+ * to know.
+ */
+ if (user->registered != REG_ALL)
+ return MOD_RES_PASSTHRU;
+
+ /* We dont have any commands looking like this? Stop processing. */
+ std::pair<AliasMap::iterator, AliasMap::iterator> iters = Aliases.equal_range(command);
+ if (iters.first == iters.second)
+ return MOD_RES_PASSTHRU;
+
+ /* The parameters for the command in their original form, with the command stripped off */
+ std::string compare(original_line, command.length());
+ while (*(compare.c_str()) == ' ')
+ compare.erase(compare.begin());
+
+ for (AliasMap::iterator i = iters.first; i != iters.second; ++i)
+ {
+ if (i->second.UserCommand)
+ {
+ if (DoAlias(user, NULL, &(i->second), compare, original_line))
+ {
+ return MOD_RES_DENY;
+ }
+ }
+ }
+
+ // If we made it here, no aliases actually matched.
+ return MOD_RES_PASSTHRU;
+ }
+
+ void OnUserMessage(User *user, void *dest, int target_type, const std::string &text, char status, const CUList &exempt_list, MessageType msgtype) CXX11_OVERRIDE
+ {
+ if ((target_type != TYPE_CHANNEL) || (msgtype != MSG_PRIVMSG))