X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_sethost.cpp;h=3634f18983f862d6966b072bcfd3b06784e0898f;hb=46e56dedd37abe33af4e8b970d5b83729dc1ef05;hp=a925e75c3d734a65001b823b3351f07ca2cc22b4;hpb=2630a87bb13b089e6d0fdcff4bcd0f3a9612e52f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp index a925e75c3..3634f1898 100644 --- a/src/modules/m_sethost.cpp +++ b/src/modules/m_sethost.cpp @@ -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 @@ -22,10 +22,9 @@ class CommandSethost : public Command private: char* hostmap; public: - CommandSethost (InspIRCd* Instance, char* hmap) : Command(Instance,"SETHOST","o",1), hostmap(hmap) + CommandSethost(Module* Creator, char* hmap) : Command(Creator,"SETHOST", 1), hostmap(hmap) { - this->source = "m_sethost.so"; - syntax = ""; + flags_needed = 'o'; syntax = ""; TRANSLATE2(TR_TEXT, TR_END); } @@ -54,7 +53,7 @@ class CommandSethost : public Command if (user->ChangeDisplayedHost(parameters[0].c_str())) { ServerInstance->SNO->WriteGlobalSno('a', std::string(user->nick)+" used SETHOST to change their displayed host to "+user->dhost); - return CMD_LOCALONLY; + return CMD_SUCCESS; } return CMD_FAILURE; @@ -67,8 +66,8 @@ class ModuleSetHost : public Module CommandSethost cmd; char hostmap[256]; public: - ModuleSetHost(InspIRCd* Me) - : Module(Me), cmd(Me, hostmap) + ModuleSetHost() + : cmd(this, hostmap) { OnRehash(NULL); ServerInstance->AddCommand(&cmd); @@ -79,7 +78,7 @@ class ModuleSetHost : public Module void OnRehash(User* user) { - ConfigReader Conf(ServerInstance); + ConfigReader Conf; std::string hmap = Conf.ReadValue("hostname", "charmap", 0); if (hmap.empty()) @@ -96,7 +95,7 @@ class ModuleSetHost : public Module virtual Version GetVersion() { - return Version("$Id$", VF_VENDOR, API_VERSION); + return Version("Provides support for the SETHOST command", VF_VENDOR); } };