X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_setname.cpp;h=bfb8f116f8d5d5bdbbacffe6d6af15d03d05c7ca;hb=de69e28a4a1aea89e410b693bbbb67890ecb0bd3;hp=b70939ca2b4a43f2efa770d80a27af7758a25409;hpb=abe0f102d7899780200b3d86557316ef71b57dab;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_setname.cpp b/src/modules/m_setname.cpp index b70939ca2..bfb8f116f 100644 --- a/src/modules/m_setname.cpp +++ b/src/modules/m_setname.cpp @@ -20,9 +20,8 @@ class CommandSetname : public Command { public: - CommandSetname (InspIRCd* Instance) : Command(Instance,"SETNAME", 0, 1, 1) + CommandSetname(Module* Creator) : Command(Creator,"SETNAME", 1, 1) { - this->source = "m_setname.so"; syntax = ""; TRANSLATE2(TR_TEXT, TR_END); } @@ -47,22 +46,19 @@ class CommandSetname : public Command return CMD_SUCCESS; } - return CMD_LOCALONLY; + return CMD_SUCCESS; } }; class ModuleSetName : public Module { - CommandSetname* mycommand; + CommandSetname cmd; public: - ModuleSetName(InspIRCd* Me) - : Module(Me) + ModuleSetName() + : cmd(this) { - - mycommand = new CommandSetname(ServerInstance); - ServerInstance->AddCommand(mycommand); - + ServerInstance->AddCommand(&cmd); } virtual ~ModuleSetName() @@ -71,7 +67,7 @@ class ModuleSetName : public Module virtual Version GetVersion() { - return Version("$Id$", VF_VENDOR, API_VERSION); + return Version("Provides support for the SETNAME command", VF_VENDOR); } };