/[svn]/ircd-hybrid/trunk/modules/m_kline.c
ViewVC logotype

Diff of /ircd-hybrid/trunk/modules/m_kline.c

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

revision 1643 by michael, Sun Nov 4 15:37:10 2012 UTC revision 1644 by michael, Tue Nov 6 22:20:16 2012 UTC
# Line 257  already_placed_kline(struct Client *sour Line 257  already_placed_kline(struct Client *sour
257    const char *reason;    const char *reason;
258    struct irc_ssaddr iphost, *piphost;    struct irc_ssaddr iphost, *piphost;
259    struct MaskItem *conf = NULL;    struct MaskItem *conf = NULL;
260    int t;    int t = 0;
261      int aftype = 0;
262    
263    if ((t = parse_netmask(lhost, &iphost, &t)) != HM_HOST)    if ((t = parse_netmask(lhost, &iphost, NULL)) != HM_HOST)
264    {    {
265  #ifdef IPV6  #ifdef IPV6
266      if (t == HM_IPV6)      if (t == HM_IPV6)
267        t = AF_INET6;        aftype = AF_INET6;
268      else      else
269  #endif  #endif
270        t = AF_INET;        aftype = AF_INET;
271      piphost = &iphost;      piphost = &iphost;
272    }    }
273    else    else
   {  
     t = 0;  
274      piphost = NULL;      piphost = NULL;
   }  
275    
276    if ((conf = find_conf_by_address(lhost, piphost, CONF_KLINE, t, luser, NULL, 0)))    if ((conf = find_conf_by_address(lhost, piphost, CONF_KLINE, aftype, luser, NULL, 0)))
277    {    {
278      if (warn)      if (warn)
279      {      {
# Line 428  static int Line 426  static int
426  remove_kline_match(const char *host, const char *user)  remove_kline_match(const char *host, const char *user)
427  {  {
428    struct irc_ssaddr iphost, *piphost;    struct irc_ssaddr iphost, *piphost;
429    struct MaskItem *conf = NULL;    struct MaskItem *conf;
430    int t;    int t = 0;
431      int aftype = 0;
432    
433    if ((t = parse_netmask(host, &iphost, NULL)) != HM_HOST)    if ((t = parse_netmask(host, &iphost, NULL)) != HM_HOST)
434    {    {
435  #ifdef IPV6  #ifdef IPV6
436      if (t == HM_IPV6)      if (t == HM_IPV6)
437        t = AF_INET6;        aftype = AF_INET6;
438      else      else
439  #endif  #endif
440        t = AF_INET;        aftype = AF_INET;
441      piphost = &iphost;      piphost = &iphost;
442    }    }
443    else    else
   {  
     t = 0;  
444      piphost = NULL;      piphost = NULL;
   }  
445    
446    if ((conf = find_conf_by_address(host, piphost, CONF_KLINE, t, user, NULL, 0)))    if ((conf = find_conf_by_address(host, piphost, CONF_KLINE, aftype, user, NULL, 0)))
447    {    {
448      if (IsConfDatabase(conf))      if (IsConfDatabase(conf))
449      {      {

Legend:
Removed from v.1643  
changed lines
  Added in v.1644

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