]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cgiirc.cpp
Set User::host before calling ChangeIP()
[user/henk/code/inspircd.git] / src / modules / m_cgiirc.cpp
index 6c94449b1db43856ece06dc42fac0e7543ace448..482c6447c9a7378c4205d6c5f228ad2544bfe0da 100644 (file)
@@ -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);