]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_alias.cpp
OnRehash changes: split to multiple hooks to clarify use and prevent explosion of...
[user/henk/code/inspircd.git] / src / modules / m_alias.cpp
index 0c627482aeb47260deb3e66c6852b08a8f8ed9f4..fb6783d8b0b4ddbd5575da9a3f061838672b50fa 100644 (file)
@@ -241,15 +241,12 @@ class ModuleAlias : public Module
                while (*(compare.c_str()) == ' ')
                        compare.erase(compare.begin());
 
-               std::string safe(compare);
-
-               ServerInstance->Logs->Log("FANTASY", DEBUG, "fantasy: compare is %s and safe is %s", compare.c_str(), safe.c_str());
-
                while (i != upperbound)
                {
                        if (i->second.ChannelCommand)
                        {
-                               if (DoAlias(user, c, &(i->second), compare, safe))
+                               // We use substr(1) here to remove the fantasy prefix
+                               if (DoAlias(user, c, &(i->second), compare, text.substr(1)))
                                        return 0;
                        }
 
@@ -366,7 +363,7 @@ class ModuleAlias : public Module
                else
                {
                        /* We don't want these in a user alias */
-                       SearchAndReplace(newline, std::string("$chan"), "");
+                       SearchAndReplace(newline, std::string("$chan"), std::string(""));
                }
 
                irc::tokenstream ss(newline);
@@ -381,7 +378,7 @@ class ModuleAlias : public Module
                ServerInstance->Parser->CallHandler(command, pars, user);
        }
 
-       virtual void OnRehash(User* user, const std::string &parameter)
+       virtual void OnRehash(User* user)
        {
                ReadAliases();
        }