]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_alltime.cpp
Header update: 2007 -> 2008
[user/henk/code/inspircd.git] / src / modules / m_alltime.cpp
index 04ae63b17556d6dc87662eb7ee07110affb9e359..aa244b45d2e2e0ebca5240cb94bc754533fab8a1 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
  * ---------------------------------------------------
  */
 
-#include <stdio.h>
-#include <string>
 #include "inspircd.h"
-#include "modules.h"
 
 /* $ModDesc: Display timestamps from all servers connected to the network */
 
-class cmd_alltime : public command_t
+class CommandAlltime : public Command
 {
  public:
-       cmd_alltime(InspIRCd *Instance) : command_t(Instance, "ALLTIME", 'o', 0)
+       CommandAlltime(InspIRCd *Instance) : Command(Instance, "ALLTIME", 'o', 0)
        {
                this->source = "m_alltime.so";
-               syntax = "";
+               syntax.clear();
+               translation.push_back(TR_END);
        }
 
-       CmdResult Handle(const char **parameters, int pcnt, userrec *user)
+       CmdResult Handle(const char **parameters, int pcnt, User *user)
        {
                char fmtdate[64];
                char fmtdate2[64];
@@ -59,15 +57,17 @@ class cmd_alltime : public command_t
        }
 };
 
+
 class Modulealltime : public Module
 {
-       cmd_alltime *mycommand;
+       CommandAlltime *mycommand;
  public:
        Modulealltime(InspIRCd *Me)
-               : Module::Module(Me)
+               : Module(Me)
        {
-               mycommand = new cmd_alltime(ServerInstance);
+               mycommand = new CommandAlltime(ServerInstance);
                ServerInstance->AddCommand(mycommand);
+
        }
        
        virtual ~Modulealltime()
@@ -81,25 +81,4 @@ class Modulealltime : public Module
        
 };
 
-class ModulealltimeFactory : public ModuleFactory
-{
- public:
-       ModulealltimeFactory()
-       {
-       }
-       
-       ~ModulealltimeFactory()
-       {
-       }
-       
-       virtual Module *CreateModule(InspIRCd *Me)
-       {
-               return new Modulealltime(Me);
-       }
-};
-
-
-extern "C" void *init_module(void)
-{
-       return new ModulealltimeFactory;
-}
+MODULE_INIT(Modulealltime)