]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_timedbans.cpp
We were already sending FMODE +nt after each channel creation to keep services happy...
[user/henk/code/inspircd.git] / src / modules / m_timedbans.cpp
index a1f4411c3066bf93f18354a28f855cfc1b995b2c..473785149ced082ddcc771ffe086aa562dbbe35d 100644 (file)
@@ -2,35 +2,26 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- *                       E-mail:
- *                <brain@chatspike.net>
- *               <Craig@chatspike.net>
- *     
- * Written by Craig Edwards, Craig McLure, and others.
+ *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * See: http://www.inspircd.org/wiki/index.php/Credits
+ *
  * This program is free but copyrighted software; see
- *            the file COPYING for details.
+ *         the file COPYING for details.
  *
  * ---------------------------------------------------
  */
 
-using namespace std;
-
 /* $ModDesc: Adds timed bans */
 
-#include <stdio.h>
-#include <vector>
+#include "inspircd.h"
 #include "users.h"
 #include "channels.h"
 #include "modules.h"
-
 #include "hashcomp.h"
 #include "configreader.h"
-#include "inspircd.h"
-
-
-
 
+/** Holds a timed ban
+ */
 class TimedBan : public classbase
 {
  public:
@@ -42,6 +33,8 @@ class TimedBan : public classbase
 typedef std::vector<TimedBan> timedbans;
 timedbans TimedBanList;
 
+/** Handle /TBAN
+ */
 class cmd_tban : public command_t
 {
  public:
@@ -119,7 +112,7 @@ class ModuleTimedBans : public Module
        cmd_tban* mycommand;
  public:
        ModuleTimedBans(InspIRCd* Me)
-               : Module::Module(Me)
+               : Module(Me)
        {
                
                mycommand = new cmd_tban(ServerInstance);
@@ -180,14 +173,14 @@ class ModuleTimedBans : public Module
                                                // falls into the abyss :p
                                                userrec* temp = new userrec(ServerInstance);
                                                temp->SetFd(FD_MAGIC_NUMBER);
-                                                /* FIX: Send mode remotely*/
-                                                std::deque<std::string> n;
-                                                n.push_back(setban[0]);
-                                                n.push_back("-b");
-                                                n.push_back(setban[2]);
+                                               /* FIX: Send mode remotely*/
+                                               std::deque<std::string> n;
+                                               n.push_back(setban[0]);
+                                               n.push_back("-b");
+                                               n.push_back(setban[2]);
                                                ServerInstance->SendMode(setban,3,temp);
-                                                Event rmode((char *)&n, NULL, "send_mode");
-                                                rmode.Send(ServerInstance);
+                                               Event rmode((char *)&n, NULL, "send_mode");
+                                               rmode.Send(ServerInstance);
                                                DELETE(temp);
                                        }
                                        else
@@ -204,7 +197,7 @@ class ModuleTimedBans : public Module
        
        virtual Version GetVersion()
        {
-               return Version(1,0,0,0,VF_VENDOR);
+               return Version(1,1,0,0,VF_VENDOR,API_VERSION);
        }
 };
 
@@ -228,7 +221,7 @@ class ModuleTimedBansFactory : public ModuleFactory
 };
 
 
-extern "C" void * init_module( void )
+extern "C" DllExport void * init_module( void )
 {
        return new ModuleTimedBansFactory;
 }