]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_dccallow.cpp
m_spanningtree Rewrite PING logic to use Timers
[user/henk/code/inspircd.git] / src / modules / m_dccallow.cpp
index cc7fbd323020b50757b466de89d11a66526324da..2b8d1306cd5f544265f4106063eb895a03db2742 100644 (file)
@@ -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