summaryrefslogtreecommitdiff
path: root/src/modules/extra
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/extra')
-rw-r--r--src/modules/extra/m_geoip.cpp26
-rw-r--r--src/modules/extra/m_ldapauth.cpp4
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp2
3 files changed, 14 insertions, 18 deletions
diff --git a/src/modules/extra/m_geoip.cpp b/src/modules/extra/m_geoip.cpp
index ff6e3c7c2..d2d8f93f8 100644
--- a/src/modules/extra/m_geoip.cpp
+++ b/src/modules/extra/m_geoip.cpp
@@ -62,23 +62,19 @@ class ModuleGeoIP : public Module
}
}
- virtual ModResult OnUserRegister(User* user)
+ virtual ModResult OnUserRegister(LocalUser* user)
{
- /* only do lookups on local users */
- if (IS_LOCAL(user))
+ const char* c = GeoIP_country_code_by_addr(gi, user->GetIPString());
+ if (c)
{
- const char* c = GeoIP_country_code_by_addr(gi, user->GetIPString());
- if (c)
- {
- std::map<std::string, std::string>::iterator x = GeoBans.find(c);
- if (x != GeoBans.end())
- ServerInstance->Users->QuitUser(user, x->second);
- }
- else
- {
- if (banunknown)
- ServerInstance->Users->QuitUser(user, "Could not identify your country of origin. Access denied.");
- }
+ std::map<std::string, std::string>::iterator x = GeoBans.find(c);
+ if (x != GeoBans.end())
+ ServerInstance->Users->QuitUser(user, x->second);
+ }
+ else
+ {
+ if (banunknown)
+ ServerInstance->Users->QuitUser(user, "Could not identify your country of origin. Access denied.");
}
return MOD_RES_PASSTHRU;
}
diff --git a/src/modules/extra/m_ldapauth.cpp b/src/modules/extra/m_ldapauth.cpp
index 50c952704..26e968367 100644
--- a/src/modules/extra/m_ldapauth.cpp
+++ b/src/modules/extra/m_ldapauth.cpp
@@ -111,7 +111,7 @@ public:
return true;
}
- ModResult OnUserRegister(User* user)
+ ModResult OnUserRegister(LocalUser* user)
{
if ((!allowpattern.empty()) && (InspIRCd::Match(user->nick,allowpattern)))
{
@@ -208,7 +208,7 @@ public:
}
}
- ModResult OnCheckReady(User* user)
+ ModResult OnCheckReady(LocalUser* user)
{
return ldapAuthed.get(user) ? MOD_RES_PASSTHRU : MOD_RES_DENY;
}
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 0267b6595..29e439ed3 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -551,7 +551,7 @@ class ModuleSSLGnuTLS : public Module
{
// This occurs AFTER OnUserConnect so we can be sure the
// protocol module has propagated the NICK message.
- if (user->GetIOHook() == this && (IS_LOCAL(user)))
+ if (user->GetIOHook() == this)
{
if (sessions[user->GetFd()].sess)
{