X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_alias.cpp;h=95667e7ed359c9ebe57f4887eabdb4fa319ecd3c;hb=c46f8a368c42f64284244f3d2dfc022a383294fa;hp=c6e53f0cfd71e3ca5219e104051caa476d780b46;hpb=25f2f7f3e8e04ecb341aab7d75dfda6724670eda;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp index c6e53f0cf..95667e7ed 100644 --- a/src/modules/m_alias.cpp +++ b/src/modules/m_alias.cpp @@ -42,9 +42,6 @@ class Alias /** Requires oper? */ bool OperOnly; - /* is case sensitive params */ - bool CaseSensitive; - /* whether or not it may be executed via fantasy (default OFF) */ bool ChannelCommand; @@ -76,8 +73,7 @@ class ModuleAlias : public Module { ConfigTag* fantasy = ServerInstance->Config->ConfValue("fantasy"); AllowBots = fantasy->getBool("allowbots", false); - std::string fpre = fantasy->getString("prefix"); - fprefix = fpre.empty() ? "!" : fpre; + fprefix = fantasy->getString("prefix", "!", 1, ServerInstance->Config->Limits.MaxLine); Aliases.clear(); ConfigTagList tags = ServerInstance->Config->ConfTags("alias"); @@ -94,7 +90,6 @@ class ModuleAlias : public Module a.UserCommand = tag->getBool("usercommand", true); a.OperOnly = tag->getBool("operonly"); a.format = tag->getString("format"); - a.CaseSensitive = tag->getBool("matchcase"); Aliases.insert(std::make_pair(a.AliasedCommand, a)); } } @@ -233,16 +228,8 @@ class ModuleAlias : public Module /* Does it match the pattern? */ if (!a->format.empty()) { - if (a->CaseSensitive) - { - if (!InspIRCd::Match(compare, a->format, rfc_case_sensitive_map)) - return 0; - } - else - { - if (!InspIRCd::Match(compare, a->format)) - return 0; - } + if (!InspIRCd::Match(compare, a->format)) + return 0; } if ((a->OperOnly) && (!user->IsOper())) @@ -352,7 +339,7 @@ class ModuleAlias : public Module ServerInstance->Parser.CallHandler(command, pars, user); } - void Prioritize() + void Prioritize() CXX11_OVERRIDE { // Prioritise after spanningtree so that channel aliases show the alias before the effects. Module* linkmod = ServerInstance->Modules->Find("m_spanningtree.so");