]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_connflood.cpp
Send HALFOP= line in CAPAB CAPABILITIES for 1201 compat (anope relies on this)
[user/henk/code/inspircd.git] / src / modules / m_connflood.cpp
index ae9fcf0e529308e0a4cad59f1d731eca17a5e821..627e1c79e2e14dffcc11a89f04680bae54edf5b2 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
  * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
@@ -24,9 +24,6 @@ private:
        time_t first;
        std::string quitmsg;
 
-       ConfigReader* conf;
-
-
 public:
        ModuleConnFlood()       {
 
@@ -47,20 +44,20 @@ public:
        void InitConf()
        {
                /* read configuration variables */
-               conf = new ConfigReader;
+               ConfigReader conf;
                /* throttle configuration */
-               seconds = conf->ReadInteger("connflood", "seconds", 0, true);
-               maxconns = conf->ReadInteger("connflood", "maxconns", 0, true);
-               timeout = conf->ReadInteger("connflood", "timeout", 0, true);
-               quitmsg = conf->ReadValue("connflood", "quitmsg", 0);
+               seconds = conf.ReadInteger("connflood", "seconds", 0, true);
+               maxconns = conf.ReadInteger("connflood", "maxconns", 0, true);
+               timeout = conf.ReadInteger("connflood", "timeout", 0, true);
+               quitmsg = conf.ReadValue("connflood", "quitmsg", 0);
 
                /* seconds to wait when the server just booted */
-               boot_wait = conf->ReadInteger("connflood", "bootwait", 0, true);
+               boot_wait = conf.ReadInteger("connflood", "bootwait", 0, true);
 
                first = ServerInstance->Time();
        }
 
-       virtual ModResult OnUserRegister(User* user)
+       virtual ModResult OnUserRegister(LocalUser* user)
        {
                time_t next = ServerInstance->Time();