/[svn]/ircd-hybrid-7.2/src/s_conf.c
ViewVC logotype

Diff of /ircd-hybrid-7.2/src/s_conf.c

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

revision 617 by michael, Fri May 12 21:44:39 2006 UTC revision 618 by michael, Tue May 23 07:07:53 2006 UTC
# Line 833  check_client(va_list args) Line 833  check_client(va_list args)
833    
834    switch (i)    switch (i)
835    {    {
     case IRCD_SOCKET_ERROR:  
       exit_client(source_p, &me, "Socket Error");  
       break;  
   
836      case TOO_MANY:      case TOO_MANY:
837        sendto_realops_flags(UMODE_FULL, L_ALL,        sendto_realops_flags(UMODE_FULL, L_ALL,
838                             "Too many on IP for %s (%s).",                             "Too many on IP for %s (%s).",
# Line 1326  detach_conf(struct Client *client_p, Con Line 1322  detach_conf(struct Client *client_p, Con
1322        case CLIENT_TYPE:        case CLIENT_TYPE:
1323        case OPER_TYPE:        case OPER_TYPE:
1324        case SERVER_TYPE:        case SERVER_TYPE:
1325          aconf = (struct AccessItem *)map_to_conf(conf);          aconf = map_to_conf(conf);
1326          if ((aclass_conf = ClassPtr(aconf)) != NULL)          if ((aclass_conf = ClassPtr(aconf)) != NULL)
1327          {          {
1328            aclass = (struct ClassItem *)map_to_conf(aclass_conf);            aclass = map_to_conf(aclass_conf);
1329    
1330            if (conf->type == CLIENT_TYPE)            if (conf->type == CLIENT_TYPE)
1331              remove_from_cidr_check(&client_p->localClient->ip, aclass);              remove_from_cidr_check(&client_p->localClient->ip, aclass);
# Line 1346  detach_conf(struct Client *client_p, Con Line 1342  detach_conf(struct Client *client_p, Con
1342          if (aconf->clients == 0 && IsConfIllegal(aconf))          if (aconf->clients == 0 && IsConfIllegal(aconf))
1343            delete_conf_item(conf);            delete_conf_item(conf);
1344          break;          break;
1345    
1346        case LEAF_TYPE:        case LEAF_TYPE:
1347        case HUB_TYPE:        case HUB_TYPE:
1348          match_item = (struct MatchItem *)map_to_conf(conf);          match_item = map_to_conf(conf);
1349          if (match_item->ref_count == 0 && match_item->illegal)          if (match_item->ref_count == 0 && match_item->illegal)
1350            delete_conf_item(conf);            delete_conf_item(conf);
1351          break;          break;
# Line 1377  detach_conf(struct Client *client_p, Con Line 1374  detach_conf(struct Client *client_p, Con
1374  int  int
1375  attach_conf(struct Client *client_p, struct ConfItem *conf)  attach_conf(struct Client *client_p, struct ConfItem *conf)
1376  {  {
   struct AccessItem *aconf;  
   struct MatchItem *match_item;  
   
1377    if (dlinkFind(&client_p->localClient->confs, conf) != NULL)    if (dlinkFind(&client_p->localClient->confs, conf) != NULL)
1378      return 1;      return 1;
1379    
# Line 1387  attach_conf(struct Client *client_p, str Line 1381  attach_conf(struct Client *client_p, str
1381        conf->type == SERVER_TYPE ||        conf->type == SERVER_TYPE ||
1382        conf->type == OPER_TYPE)        conf->type == OPER_TYPE)
1383    {    {
1384      aconf = (struct AccessItem *)map_to_conf(conf);      struct AccessItem *aconf = map_to_conf(conf);
1385    
1386      if (IsConfIllegal(aconf))      if (IsConfIllegal(aconf))
1387        return NOT_AUTHORIZED;        return NOT_AUTHORIZED;
1388    
1389      if (conf->type == CLIENT_TYPE)      if (conf->type == CLIENT_TYPE)
1390      {      {
1391        struct ClassItem *aclass;        struct ClassItem *aclass = map_to_conf(aconf->class_ptr);
       aclass = (struct ClassItem *)map_to_conf(aconf->class_ptr);  
1392    
1393        if (cidr_limit_reached(IsConfExemptLimits(aconf),        if (cidr_limit_reached(IsConfExemptLimits(aconf),
1394                               &client_p->localClient->ip, aclass))                               &client_p->localClient->ip, aclass))
1395          return TOO_MANY;  /* Already at maximum allowed */          return TOO_MANY;  /* Already at maximum allowed */
   
       CurrUserCount(aclass)++;  
1396      }      }
1397    
1398        CurrUserCount(aclass)++;
1399      aconf->clients++;      aconf->clients++;
1400    }    }
1401    else if (conf->type == HUB_TYPE || conf->type == LEAF_TYPE)    else if (conf->type == HUB_TYPE || conf->type == LEAF_TYPE)
1402    {    {
1403      match_item = (struct MatchItem *)map_to_conf(conf);      struct MatchItem *match_item = map_to_conf(conf);
1404      match_item->ref_count++;      match_item->ref_count++;
1405    }    }
1406    
# Line 1442  attach_connect_block(struct Client *clie Line 1434  attach_connect_block(struct Client *clie
1434    DLINK_FOREACH(ptr, server_items.head)    DLINK_FOREACH(ptr, server_items.head)
1435    {    {
1436      conf = ptr->data;      conf = ptr->data;
1437      aconf = (struct AccessItem *)map_to_conf(conf);      aconf = map_to_conf(conf);
1438    
1439      if (match(conf->name, name) == 0 || match(aconf->host, host) == 0)      if (match(conf->name, name) == 0 || match(aconf->host, host) == 0)
1440        continue;        continue;

Legend:
Removed from v.617  
changed lines
  Added in v.618

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