]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Apply patch from lain to fix multiple cgihosts not being read correctly.
authorpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>
Thu, 12 Jul 2007 15:13:44 +0000 (15:13 +0000)
committerpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>
Thu, 12 Jul 2007 15:13:44 +0000 (15:13 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7436 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_cgiirc.cpp

index 3a80bba0d38510e9bb41dc866f2329593f380df0..ec6d5d398c4906dd1b5904187496356a1d59f244 100644 (file)
@@ -162,20 +162,20 @@ public:
                        
                        if(hostmask.length())
                        {
-                               Hosts.push_back(CGIhost(hostmask));
-                               
-                               if(type == "pass")
-                                       Hosts.back().type = PASS;
-                               else if(type == "ident")
-                                       Hosts.back().type = IDENT;
-                               else if(type == "passfirst")
-                                       Hosts.back().type = PASSFIRST;
-                               else if(type == "webirc") {
-                                       Hosts.back().type = WEBIRC;
-                                       if(password.length())
-                                               Hosts.back().password=password;
-                                       else
+                               if(type == "webirc" && !password.length()) {
                                                ServerInstance->Log(DEFAULT, "m_cgiirc: Missing password in config: %s", hostmask.c_str());
+                               } else {
+                                       CGItype cgitype;
+                                       if(type == "pass")
+                                               cgitype = PASS;
+                                       else if(type == "ident")
+                                               cgitype = IDENT;
+                                       else if(type == "passfirst")
+                                               cgitype = PASSFIRST;
+                                       else if(type == "webirc") {
+                                               cgitype = WEBIRC;
+                                       }
+                                       Hosts.push_back(CGIhost(hostmask,cgitype, password.length() ? password : "" ));
                                }
                        }
                        else