]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sethost.cpp
Updated to keep lowermap const within hashcomp.cpp
[user/henk/code/inspircd.git] / src / modules / m_sethost.cpp
index a508a9cb48a31bb96f6a527c673e85fbe57582ec..0afffd6c15220f6d2d262c7f098a4da3323deae4 100644 (file)
@@ -1,12 +1,17 @@
-/*
- *  SETHOST module for InspIRCD
- *  Author: brain
- *  Version: 1.0.0.0
+/*       +------------------------------------+
+ *       | Inspire Internet Relay Chat Daemon |
+ *       +------------------------------------+
  *
- *  Syntax: /SETHOST [new host]
- *  Changes the user's DHOST who issues the command
- *  (oper only)
- *  
+ *  Inspire is copyright (C) 2002-2004 ChatSpike-Dev.
+ *                       E-mail:
+ *                <brain@chatspike.net>
+ *               <Craig@chatspike.net>
+ *     
+ * Written by Craig Edwards, Craig McLure, and others.
+ * This program is free but copyrighted software; see
+ *            the file COPYING for details.
+ *
+ * ---------------------------------------------------
  */
 
 #include <stdio.h>
@@ -14,6 +19,7 @@
 #include "users.h"
 #include "channels.h"
 #include "modules.h"
+#include "helperfuncs.h"
 
 /* $ModDesc: Provides support for the SETHOST command */
 
@@ -32,7 +38,7 @@ void handle_sethost(char **parameters, int pcnt, userrec *user)
                        }
                }
        }
-       strncpy(user->dhost,parameters[0],127);
+       Srv->ChangeHost(user,parameters[0]);
        Srv->SendOpers(std::string(user->nick)+" used SETHOST to change their displayed host to "+std::string(parameters[0]));
 }
 
@@ -43,7 +49,7 @@ class ModuleSetHost : public Module
        ModuleSetHost()
        {
                Srv = new Server;
-               Srv->AddCommand("SETHOST",handle_sethost,'o',1);
+               Srv->AddCommand("SETHOST",handle_sethost,'o',1,"m_sethost.so");
        }
        
        virtual ~ModuleSetHost()
@@ -53,7 +59,7 @@ class ModuleSetHost : public Module
        
        virtual Version GetVersion()
        {
-               return Version(1,0,0,0);
+               return Version(1,0,0,1,VF_VENDOR);
        }
        
 };