]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chgname.cpp
More AddModes fixes
[user/henk/code/inspircd.git] / src / modules / m_chgname.cpp
index 763ef3c17d3cad851894973852bb9bd13ac166bb..dc90b016b681fcba3974d98ec81d7ee95615fbf3 100644 (file)
  */
 
 #include "inspircd.h"
-#include "users.h"
-#include "modules.h"
 
 /* $ModDesc: Provides support for the CHGNAME command */
 
 /** Handle /CHGNAME
  */
-class cmd_chgname : public command_t
+class CommandChgname : public Command
 {
  public:
-       cmd_chgname (InspIRCd* Instance) : command_t(Instance,"CHGNAME", 'o', 2)
+       CommandChgname (InspIRCd* Instance) : Command(Instance,"CHGNAME", 'o', 2)
        {
                this->source = "m_chgname.so";
                syntax = "<nick> <newname>";
+               TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
        }
        
-       CmdResult Handle(const char** parameters, int pcnt, userrec *user)
+       CmdResult Handle(const char** parameters, int pcnt, User *user)
        {
-               userrec* dest = ServerInstance->FindNick(parameters[0]);
+               User* dest = ServerInstance->FindNick(parameters[0]);
 
                if (!dest)
                {
@@ -65,13 +64,13 @@ class cmd_chgname : public command_t
 
 class ModuleChgName : public Module
 {
-       cmd_chgname* mycommand;
+       CommandChgname* mycommand;
        
        
 public:
        ModuleChgName(InspIRCd* Me) : Module(Me)
        {
-               mycommand = new cmd_chgname(ServerInstance);
+               mycommand = new CommandChgname(ServerInstance);
                ServerInstance->AddCommand(mycommand);
        }