From: w00t Date: Sat, 2 May 2009 18:18:00 +0000 (+0000) Subject: Fix: Channel aliases should work a bit more like user aliases. This is a BC change... X-Git-Tag: v2.0.23~1880 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=343ffe89409830e85e7895888468bbccd5fdd7a6;p=user%2Fhenk%2Fcode%2Finspircd.git 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 --- 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; }