]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sethost.cpp
Pedantic clean
[user/henk/code/inspircd.git] / src / modules / m_sethost.cpp
index 48c31d4e2811a06481b70d7355d56e0804d194d9..87b88666102b36fcf4666b78880edcb1472dcab9 100644 (file)
  */
 
 #include "inspircd.h"
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
 
 /* $ModDesc: Provides support for the SETHOST command */
 
 /** Handle /SETHOST
  */
-class cmd_sethost : public command_t
+class CommandSethost : public Command
 {
  private:
        char* hostmap;
  public:
-       cmd_sethost (InspIRCd* Instance, char* hmap) : command_t(Instance,"SETHOST",'o',1), hostmap(hmap)
+       CommandSethost (InspIRCd* Instance, char* hmap) : Command(Instance,"SETHOST",'o',1), hostmap(hmap)
        {
                this->source = "m_sethost.so";
                syntax = "<new-hostname>";
+               TRANSLATE2(TR_TEXT, TR_END);
        }
 
-       CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+       CmdResult Handle (const char** parameters, int pcnt, User *user)
        {
                size_t len = 0;
                for (const char* x = parameters[0]; *x; x++, len++)
@@ -65,14 +63,14 @@ class cmd_sethost : public command_t
 
 class ModuleSetHost : public Module
 {
-       cmd_sethost* mycommand;
+       CommandSethost* mycommand;
        char hostmap[256];
  public:
        ModuleSetHost(InspIRCd* Me)
                : Module(Me)
        {       
                OnRehash(NULL,"");
-               mycommand = new cmd_sethost(ServerInstance, hostmap);
+               mycommand = new CommandSethost(ServerInstance, hostmap);
                ServerInstance->AddCommand(mycommand);
        }
 
@@ -81,7 +79,7 @@ class ModuleSetHost : public Module
                List[I_OnRehash] = 1;
        }
 
-       void OnRehash(userrec* user, const std::string &parameter)
+       void OnRehash(User* user, const std::string &parameter)
        {
                ConfigReader Conf(ServerInstance);
                std::string hmap = Conf.ReadValue("hostname", "charmap", 0);