X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_dccallow.cpp;h=2b8d1306cd5f544265f4106063eb895a03db2742;hb=bdc70892c647f0d7672aba413100730819a4b217;hp=cc7fbd323020b50757b466de89d11a66526324da;hpb=f62654a6859998f9d63eb22702c572d5ebcff15c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index cc7fbd323..2b8d1306c 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -101,7 +101,7 @@ class CommandDccallow : public Command } } - std::string nick = parameters[0].substr(1); + std::string nick(parameters[0], 1); User *target = ServerInstance->FindNickOnly(nick); if ((target) && (!IS_SERVER(target)) && (!target->quitting) && (target->registered == REG_ALL)) @@ -257,7 +257,7 @@ class ModuleDCCAllow : public Module public: ModuleDCCAllow() - : ext("dccallow", this) + : ext("dccallow", ExtensionItem::EXT_USER, this) , cmd(this, ext) { } @@ -268,11 +268,7 @@ class ModuleDCCAllow : public Module // remove their DCCALLOW list if they have one if (udl) - { - userlist::iterator it = std::find(ul.begin(), ul.end(), user); - if (it != ul.end()) - ul.erase(it); - } + stdalgo::erase(ul, user); // remove them from any DCCALLOW lists // they are currently on