]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
I am a massive idiot. Fix this problem.
authorB.Greenham <redacted>
Sun, 7 Mar 2010 05:48:39 +0000 (00:48 -0500)
committerB.Greenham <redacted>
Sun, 7 Mar 2010 05:48:39 +0000 (00:48 -0500)
src/newconf.c

index 665374f2af91cef4bc9629d080f5f373e89f87bd..6d45d20fafd7f19a74862b9ffacdc8d2cf9e9a42 100644 (file)
@@ -572,20 +572,29 @@ conf_end_oper(struct TopConf *tc)
                yy_tmpoper->umodes = yy_oper->umodes;
                yy_tmpoper->snomask = yy_oper->snomask;
 
-               if(valid_hostname(yy_oper->vhost))
-                       yy_tmpoper->vhost = rb_strdup(yy_oper->vhost);
-               else
-                       conf_report_error("Ignoring vhost setting for oper %s -- invalid hostmask.", yy_oper->name);
+               if(!EmptyString(yy_oper->vhost))
+               {
+                       if(valid_hostname(yy_oper->vhost))
+                               yy_tmpoper->vhost = rb_strdup(yy_oper->vhost);
+                       else if(!EmptyString(yy_oper->vhost))
+                               conf_report_error("Ignoring vhost setting for oper %s -- invalid hostmask.", yy_oper->name);
+               }
 
-               if(strlen(yy_oper->swhois) < 400)
-                       yy_tmpoper->swhois = rb_strdup(yy_oper->swhois);
-               else
-                       conf_report_error("Ignoring swhois setting for oper %s -- swhois too long.", yy_oper->name);
+               if(!EmptyString(yy_oper->swhois))
+               {
+                       if(strlen(yy_oper->swhois) < 400)
+                               yy_tmpoper->swhois = rb_strdup(yy_oper->swhois);
+                       else 
+                               conf_report_error("Ignoring swhois setting for oper %s -- swhois too long.", yy_oper->name);
+               }
 
-               if(strlen(yy_oper->operstring) < 400)
-                       yy_tmpoper->operstring = rb_strdup(yy_oper->operstring);
-               else
-                       conf_report_error("Ignoring operstring setting for oper %s -- operstring too long.", yy_oper->name);
+               if(!EmptyString(yy_oper->operstring))
+               {
+                       if(strlen(yy_oper->operstring) < 400)
+                               yy_tmpoper->operstring = rb_strdup(yy_oper->operstring);
+                       else
+                               conf_report_error("Ignoring operstring setting for oper %s -- operstring too long.", yy_oper->name);
+               }
 
                yy_tmpoper->privset = yy_oper->privset;