]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chgident.cpp
Dont echo the JOIN to the user whos speaking
[user/henk/code/inspircd.git] / src / modules / m_chgident.cpp
index 272bef31fc73259de8902fbaaca4c3e42508a8b8..42a4ef747ba35319a0e9bcb5a962e90ea6427e3a 100644 (file)
 
 /** Handle /CHGIDENT
  */
-class cmd_chgident : public command_t
+class CommandChgident : public Command
 {
  public:
-       cmd_chgident (InspIRCd* Instance) : command_t(Instance,"CHGIDENT", 'o', 2)
+       CommandChgident (InspIRCd* Instance) : Command(Instance,"CHGIDENT", 'o', 2)
        {
                this->source = "m_chgident.so";
                syntax = "<nick> <newident>";
                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)
                {
@@ -56,7 +56,9 @@ class cmd_chgident : public command_t
                }
 
                dest->ChangeIdent(parameters[1]);
-               ServerInstance->WriteOpers("%s used CHGIDENT to change %s's ident to '%s'", user->nick, dest->nick, dest->ident);
+
+               if (!ServerInstance->ULine(user->server))
+                       ServerInstance->WriteOpers("%s used CHGIDENT to change %s's ident to '%s'", user->nick, dest->nick, dest->ident);
 
                /* route it! */
                return CMD_SUCCESS;
@@ -66,13 +68,13 @@ class cmd_chgident : public command_t
 
 class ModuleChgIdent : public Module
 {
-       cmd_chgident* mycommand;
+       CommandChgident* mycommand;
        
        
 public:
        ModuleChgIdent(InspIRCd* Me) : Module(Me)
        {
-               mycommand = new cmd_chgident(ServerInstance);
+               mycommand = new CommandChgident(ServerInstance);
                ServerInstance->AddCommand(mycommand);
        }