]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_userip.cpp
Added ability to send and receive a challenge, dont do anything with it yet
[user/henk/code/inspircd.git] / src / modules / m_userip.cpp
index 341a666158f7a1c090a9891322aa1597f4379cdb..86b3cd02ee8ed9951135f6bd06555d7d46734114 100644 (file)
@@ -2,43 +2,36 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- *                       E-mail:
- *                <brain@chatspike.net>
- *               <Craig@chatspike.net>
- *     
- * Written by Craig Edwards, Craig McLure, and others.
+ *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * See: http://www.inspircd.org/wiki/index.php/Credits
+ *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
  *
  * ---------------------------------------------------
  */
 
-using namespace std;
-
 #include <stdio.h>
 #include <string>
 #include "users.h"
 #include "channels.h"
 #include "modules.h"
-
 #include "inspircd.h"
 
 /* $ModDesc: Provides support for USERIP command */
 
-
-
-
+/** Handle /USERIP
+ */
 class cmd_userip : public command_t
 {
  public:
- cmd_userip (InspIRCd* Instance) : command_t(Instance,"USERIP", 'o', 1)
      cmd_userip (InspIRCd* Instance) : command_t(Instance,"USERIP", 'o', 1)
        {
                this->source = "m_userip.so";
                syntax = "<nick>{,<nick>}";
        }
 
-       void Handle (const char** parameters, int pcnt, userrec *user)
+       CmdResult Handle (const char** parameters, int pcnt, userrec *user)
        {
                char Return[MAXBUF],junk[MAXBUF];
                snprintf(Return,MAXBUF,"340 %s :",user->nick);
@@ -52,6 +45,9 @@ class cmd_userip : public command_t
                        }
                }
                user->WriteServ(Return);
+
+               /* Dont send to the network */
+               return CMD_FAILURE;
        }
 };
 
@@ -83,7 +79,7 @@ class ModuleUserIP : public Module
        
        virtual Version GetVersion()
        {
-               return Version(1,0,0,1,VF_VENDOR);
+               return Version(1,1,0,1,VF_VENDOR,API_VERSION);
        }
        
 };