X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_alias.cpp;h=6bd59a78070a788eaf66b951fd84ea12dad841df;hb=ece5c62d5733fd2355657962859cded0758a2dac;hp=20d3f5c45f8521e795edf5a2f52be7584c451aed;hpb=c44433dad279aa8ad95fc936ce5d3c671fbf9aa3;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp index 20d3f5c45..6bd59a780 100644 --- a/src/modules/m_alias.cpp +++ b/src/modules/m_alias.cpp @@ -148,7 +148,7 @@ class ModuleAlias : public Module return MOD_RES_PASSTHRU; /* The parameters for the command in their original form, with the command stripped off */ - std::string compare = original_line.substr(command.length()); + std::string compare(original_line, command.length()); while (*(compare.c_str()) == ' ') compare.erase(compare.begin()); @@ -212,7 +212,7 @@ class ModuleAlias : public Module return; /* The parameters for the command in their original form, with the command stripped off */ - std::string compare = text.substr(scommand.length() + 1); + std::string compare(text, scommand.length() + 1); while (*(compare.c_str()) == ' ') compare.erase(compare.begin()); @@ -351,7 +351,7 @@ class ModuleAlias : public Module { // Prioritise after spanningtree so that channel aliases show the alias before the effects. Module* linkmod = ServerInstance->Modules->Find("m_spanningtree.so"); - ServerInstance->Modules->SetPriority(this, I_OnUserMessage, PRIORITY_AFTER, &linkmod); + ServerInstance->Modules->SetPriority(this, I_OnUserMessage, PRIORITY_AFTER, linkmod); } };