aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_cgiirc.cpp
diff options
context:
space:
mode:
authorGravatar Peter Powell2018-03-26 05:52:35 -0600
committerGravatar Peter Powell2018-04-06 22:29:42 +0100
commit1cc4cf341c6c8c1288fb25678bd36678d6a205a5 (patch)
tree857988c4bf3cd2faa761b3bfd9ab73d1fa64a6ab /src/modules/m_cgiirc.cpp
parentUpdate the GeoIP ExtItem when CGI:IRC sets the real IP (#1471) (diff)
Set User::host before calling ChangeIP()
ChangeIP() calls SetClientIP() which revalidates whether the user matches an ELine. However, because the hostname has not changed yet the user may incorrectly be marked as non-exempt.
Diffstat (limited to 'src/modules/m_cgiirc.cpp')
-rw-r--r--src/modules/m_cgiirc.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp
index 6c94449b1..482c6447c 100644
--- a/src/modules/m_cgiirc.cpp
+++ b/src/modules/m_cgiirc.cpp
@@ -201,8 +201,8 @@ class ModuleCgiIRC : public Module
{
cmd.realhost.set(user, user->host);
cmd.realip.set(user, user->GetIPString());
- ChangeIP(user, newip);
user->host = user->dhost = user->GetIPString();
+ ChangeIP(user, newip);
user->InvalidateCache();
RecheckClass(user);
// Don't create the resolver if the core couldn't put the user in a connect class or when dns is disabled
@@ -296,10 +296,10 @@ public:
if (!webirc_ip)
return MOD_RES_PASSTHRU;
- ChangeIP(user, *webirc_ip);
-
std::string* webirc_hostname = cmd.webirc_hostname.get(user);
user->host = user->dhost = (webirc_hostname ? *webirc_hostname : user->GetIPString());
+
+ ChangeIP(user, *webirc_ip);
user->InvalidateCache();
RecheckClass(user);