X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_sethost.cpp;h=87b88666102b36fcf4666b78880edcb1472dcab9;hb=2ab88037d8d7d6df3fb9686216a0b36f5ece2313;hp=48c31d4e2811a06481b70d7355d56e0804d194d9;hpb=31e2d052252c4113ae9ea63844f60df7759a03be;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp index 48c31d4e2..87b886661 100644 --- a/src/modules/m_sethost.cpp +++ b/src/modules/m_sethost.cpp @@ -12,26 +12,24 @@ */ #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 = ""; + 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 ¶meter) + void OnRehash(User* user, const std::string ¶meter) { ConfigReader Conf(ServerInstance); std::string hmap = Conf.ReadValue("hostname", "charmap", 0);