]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cgiirc.cpp
Patch to fix timedbans crash reported earlier today, thanks for the headsup wonderwal
[user/henk/code/inspircd.git] / src / modules / m_cgiirc.cpp
index 3ad4e5f7004252593928cd005ff4f98c16e6a128..fb03fd1baff7a6eaa976b3b0594d5d32f0d4fbbc 100644 (file)
@@ -114,6 +114,7 @@ class CGIResolver : public Resolver
                        strlcpy(them->dhost, result.c_str(), 63);
                        strlcpy(them->ident, "~cgiirc", 8);
                        them->InvalidateCache();
+                       them->CheckLines();
                }
        }
 
@@ -157,6 +158,7 @@ public:
        virtual void OnRehash(User* user, const std::string &parameter)
        {
                ConfigReader Conf(ServerInstance);
+               Hosts.clear();
                
                NotifyOpers = Conf.ReadFlag("cgiirc", "opernotice", 0); // If we send an oper notice when a CGI:IRC has their host changed.
                
@@ -266,20 +268,24 @@ public:
                                if(iter->type == PASS)
                                {
                                        CheckPass(user); // We do nothing if it fails so...
+                                       user->CheckLines();
                                }
                                else if(iter->type == PASSFIRST && !CheckPass(user))
                                {
                                        // If the password lookup failed, try the ident
                                        CheckIdent(user);       // If this fails too, do nothing
+                                       user->CheckLines();
                                }
                                else if(iter->type == IDENT)
                                {
                                        CheckIdent(user); // Nothing on failure.
+                                       user->CheckLines();
                                }
                                else if(iter->type == IDENTFIRST && !CheckIdent(user))
                                {
                                        // If the ident lookup fails, try the password.
                                        CheckPass(user);
+                                       user->CheckLines();
                                }
                                else if(iter->type == WEBIRC)
                                {
@@ -322,6 +328,7 @@ public:
                        ServerInstance->Users->AddLocalClone(user);
                        ServerInstance->Users->AddGlobalClone(user);
                        user->CheckClass();
+                       user->CheckLines();
                }
        }