summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-10 15:58:02 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-10 15:58:02 +0000
commit819d09d0d0914152d481d404e0466d3768f6d80b (patch)
treecd3231ceb4c18bcd60c2c5be478c752e6938a21e /src/modules
parent0471fe267719869fbb5908caf2877344d6f14e74 (diff)
Fix m_conn_waitpong not to use base64 uneccessarily.
Fix a typo introduced into openssl by a search and replace git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5916 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp2
-rw-r--r--src/modules/m_conn_waitpong.cpp31
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;
}