]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cloaking.cpp
Decide that it wasn't quite appropriate :(
[user/henk/code/inspircd.git] / src / modules / m_cloaking.cpp
index d7f4082eeff4bfbd4581f2b590139467316698d5..c48ff7b9c7ce9ab5c21501edd083d3a0ccb09ef8 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  Inspire is copyright (C) 2002-2004 ChatSpike-Dev.
+ *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
  *                       E-mail:
  *                <brain@chatspike.net>
  *               <Craig@chatspike.net>
@@ -29,7 +29,10 @@ using namespace std;
 // the server->server link, and all encoding of hosts is
 // done locally on the server by this module.
 
-#include <stdio.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
 #include "users.h"
 #include "channels.h"
 #include "modules.h"
@@ -253,7 +256,7 @@ class ModuleCloaking : public Module
                int i = 0;
                unsigned char bytes[16];
                char hash[MAXBUF];
-               strcpy(hash,"");
+               *hash = 0;
                MyMD5((char*)bytes,src,strlen(src));
                for (i = 0; i < 16; i++)
                {
@@ -300,6 +303,11 @@ class ModuleCloaking : public Module
                // listed in /MODULES
                return Version(1,0,0,1,VF_STATIC|VF_VENDOR);
        }
+
+       void Implements(char* List)
+       {
+               List[I_OnExtendedMode] = List[I_OnUserConnect] = 1;
+       }
        
        virtual int OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params)
        {