summaryrefslogtreecommitdiff
path: root/src/modules/extra/m_geoip.cpp
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-06-06 01:07:22 +0200
committerattilamolnar <attilamolnar@hush.com>2013-06-06 01:07:22 +0200
commitd9d99cd02dadf34bfcc220734ba0c422f0acb3e6 (patch)
tree72a11fab75875b7e4f739ddd203da60e5dcbc851 /src/modules/extra/m_geoip.cpp
parent8a06d54076551387f83a29360478ee6605e241b6 (diff)
parente0ff94b310e9b73ac0131e9df14fb7ca2bf3a878 (diff)
Merge insp20
Diffstat (limited to 'src/modules/extra/m_geoip.cpp')
-rw-r--r--src/modules/extra/m_geoip.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/extra/m_geoip.cpp b/src/modules/extra/m_geoip.cpp
index 7696146e8..ddc4e9a38 100644
--- a/src/modules/extra/m_geoip.cpp
+++ b/src/modules/extra/m_geoip.cpp
@@ -35,7 +35,7 @@ class ModuleGeoIP : public Module
LocalStringExt ext;
GeoIP* gi;
- void SetExt(LocalUser* user)
+ std::string* SetExt(LocalUser* user)
{
const char* c = GeoIP_country_code_by_addr(gi, user->GetIPString().c_str());
if (!c)
@@ -43,6 +43,7 @@ class ModuleGeoIP : public Module
std::string* cc = new std::string(c);
ext.set(user, cc);
+ return cc;
}
public:
@@ -85,7 +86,7 @@ class ModuleGeoIP : public Module
{
std::string* cc = ext.get(user);
if (!cc)
- SetExt(user);
+ cc = SetExt(user);
std::string geoip = myclass->config->getString("geoip");
if (geoip.empty())