ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/conf.c
(Generate patch)

Comparing:
ircd-hybrid-8/src/conf.c (file contents), Revision 1393 by michael, Wed May 2 19:17:37 2012 UTC vs.
ircd-hybrid/trunk/src/conf.c (file contents), Revision 1618 by michael, Tue Oct 30 21:04:38 2012 UTC

# Line 66 | Line 66 | dlink_list rxconf_items  = { NULL, NULL,
66   dlink_list rkconf_items  = { NULL, NULL, 0 };
67   dlink_list nresv_items   = { NULL, NULL, 0 };
68   dlink_list class_items   = { NULL, NULL, 0 };
69 – dlink_list gdeny_items   = { NULL, NULL, 0 };
69  
70   dlink_list temporary_xlines  = { NULL, NULL, 0 };
71   dlink_list temporary_resv = { NULL, NULL, 0 };
# Line 255 | Line 254 | make_conf_item(ConfType type)
254      dlinkAdd(conf, &conf->node, &uconf_items);
255      break;
256  
258 –  case GDENY_TYPE:
259 –    conf = (struct ConfItem *)MyMalloc(sizeof(struct ConfItem) +
260 –                                       sizeof(struct AccessItem));
261 –    dlinkAdd(conf, &conf->node, &gdeny_items);
262 –    break;
263 –
257    case XLINE_TYPE:
258      conf = (struct ConfItem *)MyMalloc(sizeof(struct ConfItem) +
259                                         sizeof(struct MatchItem));
# Line 314 | Line 307 | make_conf_item(ConfType type)
307      aclass->ping_freq = DEFAULT_PINGFREQUENCY;
308      aclass->max_total = MAXIMUM_LINKS_DEFAULT;
309      aclass->max_sendq = DEFAULT_SENDQ;
310 +    aclass->max_recvq = DEFAULT_RECVQ;
311  
312      break;
313  
# Line 364 | Line 358 | delete_conf_item(struct ConfItem *conf)
358      MyFree(aconf->oper_reason);
359      MyFree(aconf->user);
360      MyFree(aconf->host);
367 –    MyFree(aconf->cipher_list);
361   #ifdef HAVE_LIBCRYPTO
362 +    MyFree(aconf->cipher_list);
363 +
364      if (aconf->rsa_public_key)
365        RSA_free(aconf->rsa_public_key);
366      MyFree(aconf->rsa_public_key_file);
# Line 472 | Line 467 | delete_conf_item(struct ConfItem *conf)
467      MyFree(conf);
468      break;
469  
475 –  case GDENY_TYPE:
476 –    aconf = map_to_conf(conf);
477 –    MyFree(aconf->user);
478 –    MyFree(aconf->host);
479 –    dlinkDelete(&conf->node, &gdeny_items);
480 –    MyFree(conf);
481 –    break;
482 –
470    case CLUSTER_TYPE:
471      dlinkDelete(&conf->node, &cluster_items);
472      MyFree(conf);
# Line 548 | Line 535 | report_confitem_types(struct Client *sou
535  
536    switch (type)
537    {
551 –  case GDENY_TYPE:
552 –    DLINK_FOREACH(ptr, gdeny_items.head)
553 –    {
554 –      conf = ptr->data;
555 –      aconf = map_to_conf(conf);
556 –
557 –      p = buf;
558 –
559 –      if (aconf->flags & GDENY_BLOCK)
560 –        *p++ = 'B';
561 –      else
562 –        *p++ = 'b';
563 –
564 –      if (aconf->flags & GDENY_REJECT)
565 –        *p++ = 'R';
566 –      else
567 –        *p++ = 'r';
568 –
569 –      *p = '\0';
570 –
571 –      sendto_one(source_p, ":%s %d %s V %s@%s %s %s",
572 –                 me.name, RPL_STATSDEBUG, source_p->name,
573 –                 aconf->user, aconf->host, conf->name, buf);
574 –    }
575 –    break;
576 –
538    case XLINE_TYPE:
539      DLINK_FOREACH(ptr, xconf_items.head)
540      {
# Line 679 | Line 640 | report_confitem_types(struct Client *sou
640                   conf->name, classitem->ping_freq,
641                   classitem->con_freq,
642                   classitem->max_total, classitem->max_sendq,
643 +                 classitem->max_recvq,
644                   classitem->curr_user_count,
645 +                 classitem->number_per_cidr, classitem->cidr_bitlen_ipv4,
646 +                 classitem->number_per_cidr, classitem->cidr_bitlen_ipv6,
647                   classitem->active ? "active" : "disabled");
648      }
649      break;
# Line 711 | Line 675 | report_confitem_types(struct Client *sou
675          *p++ = 'A';
676        if (IsConfSSL(aconf))
677          *p++ = 'S';
714 –      if (IsConfTopicBurst(aconf))
715 –        *p++ = 'T';
678        if (buf[0] == '\0')
679          *p++ = '*';
680  
# Line 798 | Line 760 | check_client(va_list args)
760    switch (i)
761    {
762      case TOO_MANY:
763 <      sendto_realops_flags(UMODE_FULL, L_ALL,
763 >      sendto_realops_flags(UMODE_FULL, L_ALL, SEND_NOTICE,
764                             "Too many on IP for %s (%s).",
765                             get_client_name(source_p, SHOW_IP),
766                             source_p->sockhost);
# Line 809 | Line 771 | check_client(va_list args)
771        break;
772  
773      case I_LINE_FULL:
774 <      sendto_realops_flags(UMODE_FULL, L_ALL,
775 <                           "I-line is full for %s (%s).",
774 >      sendto_realops_flags(UMODE_FULL, L_ALL, SEND_NOTICE,
775 >                           "auth{} block is full for %s (%s).",
776                             get_client_name(source_p, SHOW_IP),
777                             source_p->sockhost);
778        ilog(LOG_TYPE_IRCD, "Too many connections from %s.",
# Line 824 | Line 786 | check_client(va_list args)
786        ++ServerStats.is_ref;
787        /* jdc - lists server name & port connections are on */
788        /*       a purely cosmetical change */
789 <      sendto_realops_flags(UMODE_UNAUTH, L_ALL,
789 >      sendto_realops_flags(UMODE_UNAUTH, L_ALL, SEND_NOTICE,
790                             "Unauthorized client connection from %s [%s] on [%s/%u].",
791                             get_client_name(source_p, SHOW_IP),
792                             source_p->sockhost,
# Line 836 | Line 798 | check_client(va_list args)
798            source_p->localClient->listener->name,
799            source_p->localClient->listener->port);
800  
801 <      /* XXX It is prolematical whether it is better to use the
840 <       * capture reject code here or rely on the connecting too fast code.
841 <       * - Dianora
842 <       */
843 <      if (REJECT_HOLD_TIME > 0)
844 <      {
845 <        sendto_one(source_p, ":%s NOTICE %s :You are not authorized to use this server",
846 <                   me.name, source_p->name);
847 <        source_p->localClient->reject_delay = CurrentTime + REJECT_HOLD_TIME;
848 <        SetCaptured(source_p);
849 <      }
850 <      else
851 <        exit_client(source_p, &me, "You are not authorized to use this server");
801 >      exit_client(source_p, &me, "You are not authorized to use this server");
802        break;
803  
804     case BANNED_CLIENT:
805 <     /*
856 <      * Don't exit them immediately, play with them a bit.
857 <      * - Dianora
858 <      */
859 <     if (REJECT_HOLD_TIME > 0)
860 <     {
861 <       source_p->localClient->reject_delay = CurrentTime + REJECT_HOLD_TIME;
862 <       SetCaptured(source_p);
863 <     }
864 <     else
865 <       exit_client(source_p, &me, "Banned");
805 >     exit_client(source_p, &me, "Banned");
806       ++ServerStats.is_ref;
807       break;
808  
# Line 935 | Line 875 | verify_access(struct Client *client_p, c
875          conf = unmap_conf_item(aconf);
876  
877          if (!ConfigFileEntry.hide_spoof_ips && IsConfSpoofNotice(aconf))
878 <          sendto_realops_flags(UMODE_ALL, L_ADMIN, "%s spoofing: %s as %s",
878 >          sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
879 >                               "%s spoofing: %s as %s",
880                                 client_p->name, client_p->host, conf->name);
881          strlcpy(client_p->host, conf->name, sizeof(client_p->host));
882          SetIPSpoof(client_p);
# Line 950 | Line 891 | verify_access(struct Client *client_p, c
891        if (IsConfGline(aconf))
892          sendto_one(client_p, ":%s NOTICE %s :*** G-lined", me.name,
893                     client_p->name);
894 <      if (ConfigFileEntry.kline_with_reason)
895 <        sendto_one(client_p, ":%s NOTICE %s :*** Banned %s",
955 <                  me.name, client_p->name, aconf->reason);
894 >      sendto_one(client_p, ":%s NOTICE %s :*** Banned: %s",
895 >                 me.name, client_p->name, aconf->reason);
896        return(BANNED_CLIENT);
897      }
898    }
# Line 1264 | Line 1204 | detach_conf(struct Client *client_p, Con
1204    struct ClassItem *aclass;
1205    struct AccessItem *aconf;
1206    struct ConfItem *aclass_conf;
1267 –  struct MatchItem *match_item;
1207  
1208    DLINK_FOREACH_SAFE(ptr, next_ptr, client_p->localClient->confs.head)
1209    {
# Line 1325 | Line 1264 | detach_conf(struct Client *client_p, Con
1264   int
1265   attach_conf(struct Client *client_p, struct ConfItem *conf)
1266   {
1267 +  struct AccessItem *aconf = map_to_conf(conf);
1268 +  struct ClassItem *aclass = map_to_conf(aconf->class_ptr);
1269 +
1270    if (dlinkFind(&client_p->localClient->confs, conf) != NULL)
1271      return 1;
1272  
1273 <  if (conf->type == CLIENT_TYPE ||
1274 <      conf->type == SERVER_TYPE ||
1333 <      conf->type == OPER_TYPE)
1334 <  {
1335 <    struct AccessItem *aconf = map_to_conf(conf);
1336 <    struct ClassItem *aclass = map_to_conf(aconf->class_ptr);
1337 <
1338 <    if (IsConfIllegal(aconf))
1339 <      return NOT_AUTHORIZED;
1273 >  if (IsConfIllegal(aconf)) /* TBV: can't happen */
1274 >    return NOT_AUTHORIZED;
1275  
1276 <    if (conf->type == CLIENT_TYPE)
1277 <      if (cidr_limit_reached(IsConfExemptLimits(aconf),
1278 <                             &client_p->localClient->ip, aclass))
1279 <        return TOO_MANY;    /* Already at maximum allowed */
1276 >  if (conf->type == CLIENT_TYPE)
1277 >    if (cidr_limit_reached(IsConfExemptLimits(aconf),
1278 >                           &client_p->localClient->ip, aclass))
1279 >      return TOO_MANY;    /* Already at maximum allowed */
1280  
1281 <    aclass->curr_user_count++;
1282 <    aconf->clients++;
1348 <  }
1281 >  aclass->curr_user_count++;
1282 >  aconf->clients++;
1283  
1284    dlinkAdd(conf, make_dlink_node(), &client_p->localClient->confs);
1285  
# Line 1752 | Line 1686 | int
1686   rehash(int sig)
1687   {
1688    if (sig != 0)
1689 <    sendto_realops_flags(UMODE_ALL, L_ALL,
1689 >    sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
1690                           "Got signal SIGHUP, reloading ircd.conf file");
1691  
1692    restart_resolver();
# Line 1827 | Line 1761 | set_default_conf(void)
1761  
1762    ConfigChannel.disable_fake_channels = 0;
1763    ConfigChannel.restrict_channels = 0;
1830 –  ConfigChannel.disable_local_channels = 0;
1831 –  ConfigChannel.use_invex = 1;
1832 –  ConfigChannel.use_except = 1;
1833 –  ConfigChannel.use_knock = 1;
1764    ConfigChannel.knock_delay = 300;
1765    ConfigChannel.knock_delay_channel = 60;
1766 <  ConfigChannel.max_chans_per_user = 15;
1766 >  ConfigChannel.max_chans_per_user = 25;
1767 >  ConfigChannel.max_chans_per_oper = 50;
1768    ConfigChannel.quiet_on_ban = 1;
1769    ConfigChannel.max_bans = 25;
1770    ConfigChannel.default_split_user_count = 0;
1771    ConfigChannel.default_split_server_count = 0;
1772    ConfigChannel.no_join_on_split = 0;
1773    ConfigChannel.no_create_on_split = 0;
1843 –  ConfigChannel.burst_topicwho = 1;
1774  
1775    ConfigServerHide.flatten_links = 0;
1776    ConfigServerHide.links_delay = 300;
1777    ConfigServerHide.hidden = 0;
1848 –  ConfigServerHide.disable_hidden = 0;
1778    ConfigServerHide.hide_servers = 0;
1779    DupString(ConfigServerHide.hidden_name, NETWORK_NAME_DEFAULT);
1780    ConfigServerHide.hide_server_ips = 0;
# Line 1853 | Line 1782 | set_default_conf(void)
1782    
1783    DupString(ConfigFileEntry.service_name, SERVICE_NAME_DEFAULT);
1784    ConfigFileEntry.max_watch = WATCHSIZE_DEFAULT;
1785 +  ConfigFileEntry.glines = 0;
1786 +  ConfigFileEntry.gline_time = 12 * 3600;
1787 +  ConfigFileEntry.gline_request_time = GLINE_REQUEST_EXPIRE_DEFAULT;
1788    ConfigFileEntry.gline_min_cidr = 16;
1789    ConfigFileEntry.gline_min_cidr6 = 48;
1790    ConfigFileEntry.invisible_on_connect = 1;
1859 –  ConfigFileEntry.burst_away = 0;
1860 –  ConfigFileEntry.use_whois_actually = 1;
1791    ConfigFileEntry.tkline_expire_notices = 1;
1792    ConfigFileEntry.hide_spoof_ips = 1;
1793    ConfigFileEntry.ignore_bogus_ts = 0;
# Line 1876 | Line 1806 | set_default_conf(void)
1806    ConfigFileEntry.anti_spam_exit_message_time = 0;
1807    ConfigFileEntry.ts_warn_delta = TS_WARN_DELTA_DEFAULT;
1808    ConfigFileEntry.ts_max_delta = TS_MAX_DELTA_DEFAULT;
1879 –  ConfigFileEntry.kline_with_reason = 1;
1880 –  ConfigFileEntry.kline_reason = NULL;
1809    ConfigFileEntry.warn_no_nline = 1;
1810    ConfigFileEntry.stats_o_oper_only = 0;
1811    ConfigFileEntry.stats_k_oper_only = 1;  /* masked */
# Line 1892 | Line 1820 | set_default_conf(void)
1820    ConfigFileEntry.no_oper_flood = 0;
1821    ConfigFileEntry.true_no_oper_flood = 0;
1822    ConfigFileEntry.oper_pass_resv = 1;
1895 –  ConfigFileEntry.glines = 0;
1896 –  ConfigFileEntry.gline_time = 12 * 3600;
1823    ConfigFileEntry.max_targets = MAX_TARGETS_DEFAULT;
1898 –  ConfigFileEntry.client_flood = CLIENT_FLOOD_DEFAULT;
1824    ConfigFileEntry.oper_only_umodes = UMODE_DEBUG;
1825    ConfigFileEntry.oper_umodes = UMODE_BOTS | UMODE_LOCOPS | UMODE_SERVNOTICE |
1826      UMODE_OPERWALL | UMODE_WALLOP;
# Line 1922 | Line 1847 | validate_conf(void)
1847    if (ConfigFileEntry.service_name == NULL)
1848      DupString(ConfigFileEntry.service_name, SERVICE_NAME_DEFAULT);
1849  
1925 –  if ((ConfigFileEntry.client_flood < CLIENT_FLOOD_MIN) ||
1926 –      (ConfigFileEntry.client_flood > CLIENT_FLOOD_MAX))
1927 –    ConfigFileEntry.client_flood = CLIENT_FLOOD_MAX;
1928 –
1850    ConfigFileEntry.max_watch = IRCD_MAX(ConfigFileEntry.max_watch, WATCHSIZE_MIN);
1851   }
1852  
# Line 1966 | Line 1887 | lookup_confhost(struct ConfItem *conf)
1887  
1888    aconf = map_to_conf(conf);
1889  
1890 <  if (EmptyString(aconf->host) ||
1970 <      EmptyString(aconf->user))
1890 >  if (has_wildcards(aconf->host))
1891    {
1892      ilog(LOG_TYPE_IRCD, "Host/server name error: (%s) (%s)",
1893           aconf->host, conf->name);
1894      return;
1895    }
1896  
1977 –  if (strchr(aconf->host, '*') ||
1978 –      strchr(aconf->host, '?'))
1979 –    return;
1980 –
1897    /* Do name lookup now on hostnames given and store the
1898     * ip numbers in conf structure.
1899     */
# Line 2162 | Line 2078 | expire_tklines(dlink_list *tklist)
2078        if (xconf->hold <= CurrentTime)
2079        {
2080          if (ConfigFileEntry.tkline_expire_notices)
2081 <          sendto_realops_flags(UMODE_ALL, L_ALL,
2082 <                               "Temporary X-line for [%s] sexpired", conf->name);
2081 >          sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
2082 >                               "Temporary X-line for [%s] expired", conf->name);
2083          dlinkDelete(ptr, tklist);
2084          free_dlink_node(ptr);
2085          delete_conf_item(conf);
# Line 2175 | Line 2091 | expire_tklines(dlink_list *tklist)
2091        if (nconf->hold <= CurrentTime)
2092        {
2093          if (ConfigFileEntry.tkline_expire_notices)
2094 <          sendto_realops_flags(UMODE_ALL, L_ALL,
2094 >          sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
2095                                 "Temporary RESV for [%s] expired", conf->name);
2096          dlinkDelete(ptr, tklist);
2097          free_dlink_node(ptr);
# Line 2188 | Line 2104 | expire_tklines(dlink_list *tklist)
2104        if (cconf->hold <= CurrentTime)
2105        {
2106          if (ConfigFileEntry.tkline_expire_notices)
2107 <          sendto_realops_flags(UMODE_ALL, L_ALL,
2107 >          sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
2108                                 "Temporary RESV for [%s] expired", cconf->name);
2109          delete_channel_resv(cconf);
2110        }
# Line 2316 | Line 2232 | read_conf_files(int cold)
2232      }
2233      else
2234      {
2235 <      sendto_realops_flags(UMODE_ALL, L_ALL,
2235 >      sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
2236                             "Unable to read configuration file '%s': %s",
2237                             filename, strerror(errno));
2238        return;
# Line 2330 | Line 2246 | read_conf_files(int cold)
2246    fclose(conf_parser_ctx.conf_file);
2247  
2248    add_isupport("NETWORK", ServerInfo.network_name, -1);
2249 <  snprintf(chanmodes, sizeof(chanmodes), "b%s%s:%d",
2250 <           ConfigChannel.use_except ? "e" : "",
2335 <           ConfigChannel.use_invex ? "I" : "", ConfigChannel.max_bans);
2249 >  snprintf(chanmodes, sizeof(chanmodes), "beI:%d",
2250 >           ConfigChannel.max_bans);
2251    add_isupport("MAXLIST", chanmodes, -1);
2252    add_isupport("MAXTARGETS", NULL, ConfigFileEntry.max_targets);
2253  
2254 <  if (ConfigChannel.disable_local_channels)
2340 <    add_isupport("CHANTYPES", "#", -1);
2341 <  else
2342 <    add_isupport("CHANTYPES", "#&", -1);
2254 >  add_isupport("CHANTYPES", "#", -1);
2255  
2256 <  snprintf(chanlimit, sizeof(chanlimit), "%s:%d",
2345 <           ConfigChannel.disable_local_channels ? "#" : "#&",
2256 >  snprintf(chanlimit, sizeof(chanlimit), "#:%d",
2257             ConfigChannel.max_chans_per_user);
2258    add_isupport("CHANLIMIT", chanlimit, -1);
2259 <  snprintf(chanmodes, sizeof(chanmodes), "%s%s%s",
2260 <           ConfigChannel.use_except ? "e" : "",
2350 <           ConfigChannel.use_invex ? "I" : "", "b,k,l,imnprstORS");
2259 >  snprintf(chanmodes, sizeof(chanmodes), "%s",
2260 >           "beI,k,l,imnprstORS");
2261    add_isupport("CHANNELLEN", NULL, LOCAL_CHANNELLEN);
2262  
2263 <  if (ConfigChannel.use_except)
2264 <    add_isupport("EXCEPTS", "e", -1);
2355 <  if (ConfigChannel.use_invex)
2356 <    add_isupport("INVEX", "I", -1);
2263 >  add_isupport("EXCEPTS", "e", -1);
2264 >  add_isupport("INVEX", "I", -1);
2265    add_isupport("CHANMODES", chanmodes, -1);
2266  
2267    /*
# Line 2362 | Line 2270 | read_conf_files(int cold)
2270     */
2271    rebuild_isupport_message_line();
2272  
2365 – #ifdef HAVE_LIBPCRE
2366 –  parse_conf_file(RKLINE_TYPE, cold);
2367 –  parse_conf_file(RXLINE_TYPE, cold);
2368 – #endif
2273    parse_conf_file(KLINE_TYPE, cold);
2274    parse_conf_file(DLINE_TYPE, cold);
2275    parse_conf_file(XLINE_TYPE, cold);
# Line 2391 | Line 2295 | parse_conf_file(int type, int cold)
2295        ilog(LOG_TYPE_IRCD, "Unable to read configuration file '%s': %s",
2296             filename, strerror(errno));
2297      else
2298 <      sendto_realops_flags(UMODE_ALL, L_ALL,
2298 >      sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
2299                      "Unable to read configuration file '%s': %s",
2300                             filename, strerror(errno));
2301    }
# Line 2415 | Line 2319 | clear_out_old_conf(void)
2319    struct ConfItem *conf;
2320    struct AccessItem *aconf;
2321    struct ClassItem *cltmp;
2418 –  struct MatchItem *match_item;
2322    dlink_list *free_items [] = {
2323      &server_items,   &oconf_items,
2324       &uconf_items,   &xconf_items, &rxconf_items, &rkconf_items,
2325 <     &nresv_items, &cluster_items,  &gdeny_items, &service_items, NULL
2325 >     &nresv_items, &cluster_items,  &service_items, NULL
2326    };
2327  
2328    dlink_list ** iterator = free_items; /* C is dumb */
# Line 2609 | Line 2512 | get_conf_name(ConfType type)
2512      case KLINE_TYPE:
2513        return ConfigFileEntry.klinefile;
2514        break;
2612 –    case RKLINE_TYPE:
2613 –      return ConfigFileEntry.rklinefile;
2614 –      break;
2515      case DLINE_TYPE:
2516        return ConfigFileEntry.dlinefile;
2517        break;
2518      case XLINE_TYPE:
2519        return ConfigFileEntry.xlinefile;
2520        break;
2621 –    case RXLINE_TYPE:
2622 –      return ConfigFileEntry.rxlinefile;
2623 –      break;
2521      case CRESV_TYPE:
2522        return ConfigFileEntry.cresvfile;
2523        break;
2524      case NRESV_TYPE:
2525        return ConfigFileEntry.nresvfile;
2526        break;
2630 –    case GLINE_TYPE:
2631 –      return ConfigFileEntry.glinefile;
2632 –      break;
2633 –
2527      default:
2528        return NULL;  /* This should NEVER HAPPEN since we call this function
2529                         only with the above values, this will cause us to core
# Line 2785 | Line 2678 | init_class(void)
2678    aclass->ping_freq = DEFAULT_PINGFREQUENCY;
2679    aclass->max_total = MAXIMUM_LINKS_DEFAULT;
2680    aclass->max_sendq = DEFAULT_SENDQ;
2681 +  aclass->max_recvq = DEFAULT_RECVQ;
2682  
2683    client_check_cb = register_callback("check_client", check_client);
2684   }
# Line 2830 | Line 2724 | get_sendq(struct Client *client_p)
2724    return DEFAULT_SENDQ;
2725   }
2726  
2727 + unsigned int
2728 + get_recvq(struct Client *client_p)
2729 + {
2730 +  unsigned int recvq = DEFAULT_RECVQ;
2731 +  dlink_node *cnode;
2732 +  struct ConfItem *class_conf;
2733 +  struct ClassItem *aclass;
2734 +  struct AccessItem *aconf;
2735 +
2736 +  assert(!IsMe(client_p));
2737 +
2738 +  if ((cnode = client_p->localClient->confs.head))
2739 +  {
2740 +    struct ConfItem *conf = cnode->data;
2741 +
2742 +    assert((conf->type == CLIENT_TYPE) || (conf->type == SERVER_TYPE) ||
2743 +          (conf->type == OPER_TYPE));
2744 +
2745 +    aconf = map_to_conf(conf);
2746 +
2747 +    if ((class_conf = aconf->class_ptr) == NULL)
2748 +      return DEFAULT_RECVQ; /* TBV: shouldn't be possible at all */
2749 +
2750 +    aclass = map_to_conf(class_conf);
2751 +    recvq = aclass->max_recvq;
2752 +    return recvq;
2753 +  }
2754 +
2755 +  /* XXX return a default?
2756 +   * if here, then there wasn't an attached conf with a recvq
2757 +   * that is very bad -Dianora
2758 +   */
2759 +  return DEFAULT_RECVQ;
2760 + }
2761 +
2762   /* conf_add_class_to_conf()
2763   *
2764   * inputs       - pointer to config item
# Line 2847 | Line 2776 | conf_add_class_to_conf(struct ConfItem *
2776      aconf->class_ptr = class_default;
2777  
2778      if (conf->type == CLIENT_TYPE)
2779 <      sendto_realops_flags(UMODE_ALL, L_ALL,
2779 >      sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
2780                             "Warning *** Defaulting to default class for %s@%s",
2781                             aconf->user, aconf->host);
2782      else
2783 <      sendto_realops_flags(UMODE_ALL, L_ALL,
2783 >      sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
2784                             "Warning *** Defaulting to default class for %s",
2785                             conf->name);
2786    }
# Line 2864 | Line 2793 | conf_add_class_to_conf(struct ConfItem *
2793    if (aconf->class_ptr == NULL || !class->active)
2794    {
2795      if (conf->type == CLIENT_TYPE)
2796 <      sendto_realops_flags(UMODE_ALL, L_ALL,
2796 >      sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
2797                             "Warning *** Defaulting to default class for %s@%s",
2798                             aconf->user, aconf->host);
2799      else
2800 <      sendto_realops_flags(UMODE_ALL, L_ALL,
2800 >      sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
2801                             "Warning *** Defaulting to default class for %s",
2802                             conf->name);
2803      aconf->class_ptr = class_default;
# Line 2891 | Line 2820 | conf_add_server(struct ConfItem *conf, c
2820  
2821    if (!aconf->host || !conf->name)
2822    {
2823 <    sendto_realops_flags(UMODE_ALL, L_ALL, "Bad connect block");
2823 >    sendto_realops_flags(UMODE_ALL, L_ALL,  SEND_NOTICE,
2824 >                         "Bad connect block");
2825      ilog(LOG_TYPE_IRCD, "Bad connect block");
2826      return -1;
2827    }
2828  
2829    if (EmptyString(aconf->passwd))
2830    {
2831 <    sendto_realops_flags(UMODE_ALL, L_ALL, "Bad connect block, name %s",
2831 >    sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
2832 >                         "Bad connect block, name %s",
2833                           conf->name);
2834      ilog(LOG_TYPE_IRCD, "Bad connect block, host %s", conf->name);
2835      return -1;
# Line 2924 | Line 2855 | yyerror(const char *msg)
2855      return;
2856  
2857    strip_tabs(newlinebuf, linebuf, sizeof(newlinebuf));
2858 <  sendto_realops_flags(UMODE_ALL, L_ALL, "\"%s\", line %u: %s: %s",
2858 >  sendto_realops_flags(UMODE_ALL, L_ALL,  SEND_NOTICE,
2859 >                       "\"%s\", line %u: %s: %s",
2860                         conffilebuf, lineno + 1, msg, newlinebuf);
2861    ilog(LOG_TYPE_IRCD, "\"%s\", line %u: %s: %s",
2862         conffilebuf, lineno + 1, msg, newlinebuf);
# Line 3235 | Line 3167 | find_user_host(struct Client *source_p,
3167      
3168      return 1;
3169    }
3170 <  else if (!(flags & NOUSERLOOKUP))
3170 >  else
3171    {
3172      /* Try to find user@host mask from nick */
3173      /* Okay to use source_p as the first param, because source_p == client_p */

Diff Legend

– Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)