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

Comparing ircd-hybrid/trunk/src/client.c (file contents):
Revision 2739 by michael, Sat Jan 4 20:04:27 2014 UTC vs.
Revision 2813 by michael, Sun Jan 12 20:23:50 2014 UTC

# Line 76 | Line 76 | static dlink_node *eac_next;  /* next ab
76  
77   static void check_pings_list(dlink_list *);
78   static void check_unknowns_list(void);
79 – static void ban_them(struct Client *, struct MaskItem *);
79  
80  
81   /* client_init()
# Line 358 | Line 357 | check_conf_klines(void)
357        if (conf->type == CONF_EXEMPT)
358          continue;
359  
360 <      ban_them(client_p, conf);
360 >      conf_try_ban(client_p, conf);
361        continue; /* and go examine next fd/client_p */
362      }
363  
# Line 368 | Line 367 | check_conf_klines(void)
367                                         CONF_GLINE, client_p->localClient->aftype,
368                                         client_p->username, NULL, 1)))
369        {
370 <        if (IsExemptKline(client_p) ||
372 <            IsExemptGline(client_p))
373 <        {
374 <          sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
375 <                               "GLINE over-ruled for %s, client is %sline_exempt",
376 <                               get_client_name(client_p, HIDE_IP), IsExemptKline(client_p) ? "k" : "g");
377 <          continue;
378 <        }
379 <
380 <        ban_them(client_p, conf);
370 >        conf_try_ban(client_p, conf);
371          /* and go examine next fd/client_p */
372          continue;
373        }
# Line 387 | Line 377 | check_conf_klines(void)
377                                       CONF_KLINE, client_p->localClient->aftype,
378                                       client_p->username, NULL, 1)))
379      {
380 <      if (IsExemptKline(client_p))
391 <      {
392 <        sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
393 <                             "KLINE over-ruled for %s, client is kline_exempt",
394 <                             get_client_name(client_p, HIDE_IP));
395 <        continue;
396 <      }
397 <
398 <      ban_them(client_p, conf);
380 >      conf_try_ban(client_p, conf);
381        continue;
382      }
383  
384      if ((conf = find_matching_name_conf(CONF_XLINE,  client_p->info,
385                                          NULL, NULL, 0)))
386      {
387 <      ban_them(client_p, conf);
387 >      conf_try_ban(client_p, conf);
388        continue;
389      }
390    }
# Line 424 | Line 406 | check_conf_klines(void)
406   }
407  
408   /*
409 < * ban_them
409 > * conf_try_ban
410   *
411   * inputs       - pointer to client to ban
412   *              - pointer to MaskItem
413   * output       - NONE
414   * side effects - given client_p is banned
415   */
416 < static void
417 < ban_them(struct Client *client_p, struct MaskItem *conf)
416 > void
417 > conf_try_ban(struct Client *client_p, struct MaskItem *conf)
418   {
419    const char *user_reason = NULL;  /* What is sent to user */
420    const char *type_string = NULL;
# Line 444 | Line 426 | ban_them(struct Client *client_p, struct
426    switch (conf->type)
427    {
428      case CONF_KLINE:
429 +      if (IsExemptKline(client_p))
430 +      {
431 +        sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
432 +                             "KLINE over-ruled for %s, client is kline_exempt",
433 +                             get_client_name(client_p, HIDE_IP));
434 +        return;
435 +      }
436 +
437        type_string = kline_string;
438        break;
439      case CONF_DLINE:
440        type_string = dline_string;
441        break;
442      case CONF_GLINE:
443 +      if (IsExemptKline(client_p) ||
444 +          IsExemptGline(client_p))
445 +      {
446 +        sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
447 +                             "GLINE over-ruled for %s, client is %sline_exempt",
448 +                             get_client_name(client_p, HIDE_IP), IsExemptKline(client_p) ? "k" : "g");
449 +        return;
450 +      }
451 +        
452        type_string = gline_string;
453        break;
454      case CONF_XLINE:

Diff Legend

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