X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fextra%2Fm_ldap.cpp;h=f3ace540932854886f6f70699a1b160a34166170;hb=b7716ed57704b2b2bcc665a590aecc8f02de631d;hp=c1102583600d1defcb15f6215725a6d218a19e5e;hpb=b9e11915a976daaf790ebc763aff56e19fd49e0f;p=user%2Fhenk%2Fcode%2Finspircd.git
diff --git a/src/modules/extra/m_ldap.cpp b/src/modules/extra/m_ldap.cpp
index c11025836..f3ace5409 100644
--- a/src/modules/extra/m_ldap.cpp
+++ b/src/modules/extra/m_ldap.cpp
@@ -17,9 +17,20 @@
* along with this program. If not, see .
*/
+/// $LinkerFlags: -llber -lldap_r
+
+/// $PackageInfo: require_system("centos") openldap-devel
+/// $PackageInfo: require_system("debian") libldap2-dev
+/// $PackageInfo: require_system("ubuntu") libldap2-dev
+
#include "inspircd.h"
#include "modules/ldap.h"
+// Ignore OpenLDAP deprecation warnings on OS X Yosemite and newer.
+#if defined __APPLE__
+# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
#include
#ifdef _WIN32
@@ -27,8 +38,6 @@
# pragma comment(lib, "liblber.lib")
#endif
-/* $LinkerFlags: -lldap_r */
-
class LDAPService;
class LDAPRequest
@@ -170,7 +179,6 @@ class LDAPService : public LDAPProvider, public SocketThread
time_t last_connect;
int searchscope;
time_t timeout;
- time_t last_timeout_check;
public:
static LDAPMod** BuildMods(const LDAPMods& attributes)
@@ -247,7 +255,7 @@ class LDAPService : public LDAPProvider, public SocketThread
LDAPService(Module* c, ConfigTag* tag)
: LDAPProvider(c, "LDAP/" + tag->getString("id"))
- , con(NULL), config(tag), last_connect(0), last_timeout_check(0)
+ , con(NULL), config(tag), last_connect(0)
{
std::string scope = config->getString("searchscope");
if (scope == "base")
@@ -256,7 +264,7 @@ class LDAPService : public LDAPProvider, public SocketThread
searchscope = LDAP_SCOPE_ONELEVEL;
else
searchscope = LDAP_SCOPE_SUBTREE;
- timeout = config->getInt("timeout", 5);
+ timeout = config->getDuration("timeout", 5);
Connect();
}