diff options
author | Peter Powell <petpow@saberuk.com> | 2016-10-13 08:41:57 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2016-11-16 10:56:39 +0000 |
commit | 25f2f7f3e8e04ecb341aab7d75dfda6724670eda (patch) | |
tree | c1b1f4cedb61a3df297b6754ee7f3625b4950c8f /src | |
parent | 1457c8738c707bddde4bb73fafcb618c24be9abe (diff) |
Rework the example services aliases.
- Split common stuff into a generic configuration file.
- Reserve all nicknames used by services by default.
- Exempt all services clients from filtering.
- Add missing aliases for services pseudoclients.
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_alias.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp index 9184b10af..c6e53f0cf 100644 --- a/src/modules/m_alias.cpp +++ b/src/modules/m_alias.cpp @@ -271,7 +271,7 @@ class ModuleAlias : public Module if (crlf == std::string::npos) { - DoCommand(a->ReplaceFormat, user, c, safe); + DoCommand(a->ReplaceFormat, user, c, safe, a); return 1; } else @@ -280,13 +280,13 @@ class ModuleAlias : public Module std::string scommand; while (commands.GetToken(scommand)) { - DoCommand(scommand, user, c, safe); + DoCommand(scommand, user, c, safe, a); } return 1; } } - void DoCommand(const std::string& newline, User* user, Channel *chan, const std::string &original_line) + void DoCommand(const std::string& newline, User* user, Channel *chan, const std::string &original_line, Alias* a) { std::string result; result.reserve(newline.length()); @@ -328,6 +328,11 @@ class ModuleAlias : public Module result.append(user->dhost); i += 5; } + else if (!newline.compare(i, 12, "$requirement", 12)) + { + result.append(a->RequiredNick); + i += 11; + } else result.push_back(c); } |