diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_conn_waitpong.cpp | 31 |
2 files changed, 20 insertions, 13 deletions
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 49c2ecfc8..ed3d60b34 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -1,7 +1,7 @@ #include <string> #include <vector> -#include <openssl/transport.h> +#include <openssl/ssl.h> #include <openssl/err.h> #include "inspircd_config.h" diff --git a/src/modules/m_conn_waitpong.cpp b/src/modules/m_conn_waitpong.cpp index 8d62357cd..37e2d7608 100644 --- a/src/modules/m_conn_waitpong.cpp +++ b/src/modules/m_conn_waitpong.cpp @@ -1,6 +1,21 @@ +/* +------------------------------------+ + * | 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. + * This program is free but copyrighted software; see + * the file COPYING for details. + * + * --------------------------------------------------- + */ + #include <stdlib.h> #include <string> -#include "aes.h" #include "users.h" #include "channels.h" #include "modules.h" @@ -13,19 +28,11 @@ char* RandString(unsigned int length) { - unsigned char* tmp = new unsigned char[(length/4)*3]; - - for(unsigned int i = 0; i < (length/4)*3; i++) - tmp[i] = (unsigned char)rand(); - unsigned char* out = new unsigned char[length+1]; - - to64frombits(out, tmp, (length/4)*3); - + for(unsigned int i = 0; i < length; i++) + out[i] = ((rand() % 26) + 65); out[length] = '\0'; - - DELETE(tmp); - + return (char*)out; } |