summaryrefslogtreecommitdiff
path: root/src/modules/m_alias.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2009-05-02 18:18:00 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2009-05-02 18:18:00 +0000
commit343ffe89409830e85e7895888468bbccd5fdd7a6 (patch)
tree33f7344e28871e8b8722949d5ad6b3efae94b69c /src/modules/m_alias.cpp
parent6cfc9625c0068d1a2d67fb9d08a1670a6f2358e4 (diff)
Fix: Channel aliases should work a bit more like user aliases. This is a BC change: all existing channel aliases will likely be BROKEN, and will need to be changed. Like user aliases, $1 is now the fantasy command that was invoked, $2 is the first real param of the command. Reported by Namegduf.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11347 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_alias.cpp')
-rw-r--r--src/modules/m_alias.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp
index 0c627482a..04d43bcb8 100644
--- a/src/modules/m_alias.cpp
+++ b/src/modules/m_alias.cpp
@@ -241,15 +241,14 @@ 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;
}