summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/extra/m_geoip.cpp11
-rw-r--r--src/modules/extra/m_ldapauth.cpp5
-rw-r--r--src/modules/extra/m_ldapoper.cpp5
-rw-r--r--src/modules/extra/m_mysql.cpp4
-rw-r--r--src/modules/extra/m_regex_pcre.cpp2
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp8
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp13
7 files changed, 34 insertions, 14 deletions
diff --git a/src/modules/extra/m_geoip.cpp b/src/modules/extra/m_geoip.cpp
index cdd269003..5b78be88b 100644
--- a/src/modules/extra/m_geoip.cpp
+++ b/src/modules/extra/m_geoip.cpp
@@ -16,6 +16,10 @@
#include <GeoIP.h>
+#ifdef WINDOWS
+# pragma comment(lib, "GeoIP.lib")
+#endif
+
/* $ModDesc: Provides a way to restrict users by country using GeoIP lookup */
/* $LinkerFlags: -lGeoIP */
@@ -25,13 +29,16 @@ class ModuleGeoIP : public Module
GeoIP* gi;
public:
- ModuleGeoIP() : ext("geoip_cc", this)
+ ModuleGeoIP() : ext("geoip_cc", this), gi(NULL)
{
- gi = GeoIP_new(GEOIP_STANDARD);
}
void init()
{
+ gi = GeoIP_new(GEOIP_STANDARD);
+ if (gi == NULL)
+ throw ModuleException("Unable to initialize geoip, are you missing GeoIP.dat?");
+
ServerInstance->Modules->AddService(ext);
Implementation eventlist[] = { I_OnSetConnectClass };
ServerInstance->Modules->Attach(eventlist, this, 1);
diff --git a/src/modules/extra/m_ldapauth.cpp b/src/modules/extra/m_ldapauth.cpp
index 85a0181c4..4fae7a2e7 100644
--- a/src/modules/extra/m_ldapauth.cpp
+++ b/src/modules/extra/m_ldapauth.cpp
@@ -28,6 +28,11 @@
#include <ldap.h>
+#ifdef WINDOWS
+# pragma comment(lib, "ldap.lib")
+# pragma comment(lib, "lber.lib")
+#endif
+
/* $ModDesc: Allow/Deny connections based upon answer from LDAP server */
/* $LinkerFlags: -lldap */
diff --git a/src/modules/extra/m_ldapoper.cpp b/src/modules/extra/m_ldapoper.cpp
index 45f03aa8e..77e5989db 100644
--- a/src/modules/extra/m_ldapoper.cpp
+++ b/src/modules/extra/m_ldapoper.cpp
@@ -28,6 +28,11 @@
#include <ldap.h>
+#ifdef WINDOWS
+# pragma comment(lib, "ldap.lib")
+# pragma comment(lib, "lber.lib")
+#endif
+
/* $ModDesc: Allow/Deny connections based upon answer from LDAP server */
/* $LinkerFlags: -lldap */
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp
index 1eb65794d..d9df1ed61 100644
--- a/src/modules/extra/m_mysql.cpp
+++ b/src/modules/extra/m_mysql.cpp
@@ -19,7 +19,9 @@
#include "sql.h"
#ifdef WINDOWS
-#pragma comment(lib, "mysqlclient.lib")
+# pragma comment(lib, "mysqlclient.lib")
+# pragma comment(lib, "advapi32.lib")
+# pragma comment(linker, "/NODEFAULTLIB:LIBCMT")
#endif
/* VERSION 3 API: With nonblocking (threaded) requests */
diff --git a/src/modules/extra/m_regex_pcre.cpp b/src/modules/extra/m_regex_pcre.cpp
index 095513782..99f62a2c2 100644
--- a/src/modules/extra/m_regex_pcre.cpp
+++ b/src/modules/extra/m_regex_pcre.cpp
@@ -21,7 +21,7 @@
/* $LinkerFlags: exec("pcre-config --libs") rpath("pcre-config --libs") -lpcre */
#ifdef WINDOWS
-#pragma comment(lib, "pcre.lib")
+# pragma comment(lib, "libpcre.lib")
#endif
class PCREException : public ModuleException
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index ff7a1654b..95638417b 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -18,10 +18,6 @@
#include "ssl.h"
#include "m_cap.h"
-#ifdef WINDOWS
-#pragma comment(lib, "libgnutls-13.lib")
-#endif
-
/* $ModDesc: Provides SSL support for clients */
/* $CompileFlags: pkgconfincludes("gnutls","/gnutls/gnutls.h","") */
/* $LinkerFlags: rpath("pkg-config --libs gnutls") pkgconflibs("gnutls","/libgnutls.so","-lgnutls") */
@@ -50,7 +46,7 @@ static ssize_t gnutls_pull_wrapper(gnutls_transport_ptr_t user_wrap, void* buffe
errno = EAGAIN;
return -1;
}
- int rv = recv(user->GetFd(), buffer, size, 0);
+ int rv = recv(user->GetFd(), reinterpret_cast<char *>(buffer), size, 0);
if (rv < (int)size)
ServerInstance->SE->ChangeEventMask(user, FD_READ_WILL_BLOCK);
return rv;
@@ -64,7 +60,7 @@ static ssize_t gnutls_push_wrapper(gnutls_transport_ptr_t user_wrap, const void*
errno = EAGAIN;
return -1;
}
- int rv = send(user->GetFd(), buffer, size, 0);
+ int rv = send(user->GetFd(), reinterpret_cast<const char *>(buffer), size, 0);
if (rv < (int)size)
ServerInstance->SE->ChangeEventMask(user, FD_WRITE_WILL_BLOCK);
return rv;
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index d163cebb7..7cae1a344 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -17,10 +17,15 @@
#include "ssl.h"
#ifdef WINDOWS
-#pragma comment(lib, "libeay32MTd")
-#pragma comment(lib, "ssleay32MTd")
-#undef MAX_DESCRIPTORS
-#define MAX_DESCRIPTORS 10000
+# pragma comment(lib, "libcrypto.lib")
+# pragma comment(lib, "libssl.lib")
+# pragma comment(lib, "user32.lib")
+# pragma comment(lib, "advapi32.lib")
+# pragma comment(lib, "libgcc.lib")
+# pragma comment(lib, "libmingwex.lib")
+# pragma comment(lib, "gdi32.lib")
+# undef MAX_DESCRIPTORS
+# define MAX_DESCRIPTORS 10000
#endif
/* $ModDesc: Provides SSL support for clients */