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

Comparing ircd-hybrid-7.2/src/s_conf.c (file contents):
Revision 596 by michael, Fri May 12 21:44:39 2006 UTC vs.
Revision 618 by michael, Tue May 23 07:07:53 2006 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines