]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cloaking.cpp
Fix test client error cheecking on result types
[user/henk/code/inspircd.git] / src / modules / m_cloaking.cpp
index b9b9f4402fd6d694e417a215e4ded1867b0f6d55..ab13708ea583d181cd03c5b2dfc9e6179b2d4590 100644 (file)
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
+#include "inspircd_config.h"
+#ifdef HAS_STDINT
 #include <stdint.h>
+#endif
 #include "inspircd.h"
 #include "users.h"
 #include "channels.h"
 #define F4(x, y, z) (y ^ (x | ~z))
 #define MD5STEP(f,w,x,y,z,in,s) (w += f(x,y,z) + in, w = (w<<s | w>>(32-s)) + x)
 
+#ifndef HAS_STDINT
+typedef unsigned int uint32_t;
+#endif
+
 typedef uint32_t word32; /* NOT unsigned long. We don't support 16 bit platforms, anyway. */
 typedef unsigned char byte;
 
-struct xMD5Context {
+class xMD5Context : public classbase
+{
+ public:
        word32 buf[4];
        word32 bytes[2];
        word32 in[16];
@@ -423,7 +432,7 @@ class ModuleCloaking : public Module
                // SAMODE in unreal. Note that to the user it will appear as if they set
                // the mode on themselves.
                
-               char* modes[2];                 // only two parameters
+               const char* modes[2];           // only two parameters
                modes[0] = user->nick;          // first parameter is the nick
                modes[1] = "+x";                // second parameter is the mode
                Srv->SendMode(modes,2,user);    // send these, forming the command "MODE <nick> +x"