/[svn]/ircd-hybrid/trunk/src/conf.c
ViewVC logotype

Diff of /ircd-hybrid/trunk/src/conf.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1646 by michael, Wed Nov 7 21:02:43 2012 UTC revision 1647 by michael, Fri Nov 9 20:11:58 2012 UTC
# Line 1457  read_conf(FILE *file) Line 1457  read_conf(FILE *file)
1457   * start DNS lookups of all hostnames in the conf   * start DNS lookups of all hostnames in the conf
1458   * line and convert an IP addresses in a.b.c.d number for to IP#s.   * line and convert an IP addresses in a.b.c.d number for to IP#s.
1459   */   */
1460  static void  void
1461  lookup_confhost(struct MaskItem *conf)  lookup_confhost(struct MaskItem *conf)
1462  {  {
1463    struct addrinfo hints, *res;    struct addrinfo hints, *res;
1464    
   if (has_wildcards(conf->host))  
   {  
     ilog(LOG_TYPE_IRCD, "Host/server name error: (%s) (%s)",  
          conf->host, conf->name);  
     return;  
   }  
   
1465    /* Do name lookup now on hostnames given and store the    /* Do name lookup now on hostnames given and store the
1466     * ip numbers in conf structure.     * ip numbers in conf structure.
1467     */     */
# Line 1961  conf_add_class_to_conf(struct MaskItem * Line 1954  conf_add_class_to_conf(struct MaskItem *
1954    }    }
1955  }  }
1956    
 /* conf_add_server()  
  *  
  * inputs       - pointer to config item  
  *              - pointer to link count already on this conf  
  * output       - NONE  
  * side effects - Add a connect block  
  */  
 int  
 conf_add_server(struct MaskItem *conf, const char *class_name)  
 {  
   conf_add_class_to_conf(conf, class_name);  
   
   if (EmptyString(conf->host) || EmptyString(conf->name))  
   {  
     sendto_realops_flags(UMODE_ALL, L_ALL,  SEND_NOTICE,  
                          "Bad connect block");  
     ilog(LOG_TYPE_IRCD, "Bad connect block");  
     return -1;  
   }  
   
   if (EmptyString(conf->passwd))  
   {  
     sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,  
                          "Bad connect block, name %s",  
                          conf->name);  
     ilog(LOG_TYPE_IRCD, "Bad connect block, host %s", conf->name);  
     return -1;  
   }  
   
   lookup_confhost(conf);  
   
   return 0;  
 }  
   
1957  /* yyerror()  /* yyerror()
1958   *   *
1959   * inputs       - message from parser   * inputs       - message from parser

Legend:
Removed from v.1646  
changed lines
  Added in v.1647

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28