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

Comparing ircd-hybrid/trunk/modules/m_dline.c (file contents):
Revision 1632 by michael, Sun Nov 4 15:37:10 2012 UTC vs.
Revision 1644 by michael, Tue Nov 6 22:20:16 2012 UTC

# Line 96 | Line 96 | remove_dline_match(const char *host)
96   {
97    struct irc_ssaddr iphost, *piphost;
98    struct MaskItem *conf;
99 <  int t;
99 >  int t = 0;
100 >  int aftype = 0;
101  
102    if ((t = parse_netmask(host, &iphost, NULL)) != HM_HOST)
103    {
104   #ifdef IPV6
105      if (t == HM_IPV6)
106 <      t = AF_INET6;
106 >      aftype = AF_INET6;
107      else
108   #endif
109 <      t = AF_INET;
109 >      aftype = AF_INET;
110      piphost = &iphost;
111    }
112    else
112  {
113    t = 0;
113      piphost = NULL;
115  }
114  
115 <  if ((conf = find_conf_by_address(host, piphost, CONF_DLINE, t, NULL, NULL, 0)))
115 >  if ((conf = find_conf_by_address(host, piphost, CONF_DLINE, aftype, NULL, NULL, 0)))
116    {
117      if (IsConfDatabase(conf))
118      {
# Line 148 | Line 146 | mo_dline(struct Client *client_p, struct
146    struct irc_ssaddr daddr;
147    struct MaskItem *conf=NULL;
148    time_t tkline_time=0;
149 <  int bits, t;
149 >  int bits = 0, aftype = 0, t = 0;
150    const char *current_date = NULL;
151    time_t cur_time;
152    char hostip[HOSTIPLEN + 1];
# Line 231 | Line 229 | mo_dline(struct Client *client_p, struct
229  
230   #ifdef IPV6
231    if (t == HM_IPV6)
232 <    t = AF_INET6;
232 >    aftype = AF_INET6;
233    else
234   #endif
235 <    t = AF_INET;
235 >    aftype = AF_INET;
236  
237    parse_netmask(dlhost, &daddr, NULL);
238  
239 <  if ((conf = find_dline_conf(&daddr, t)) != NULL)
239 >  if ((conf = find_dline_conf(&daddr, aftype)) != NULL)
240    {
241      creason = conf->reason ? conf->reason : def_reason;
242      if (IsConfExemptKline(conf))
# Line 283 | Line 281 | ms_dline(struct Client *client_p, struct
281    struct irc_ssaddr daddr;
282    struct MaskItem *conf=NULL;
283    time_t tkline_time=0;
284 <  int bits, t;
284 >  int bits = 0, aftype = 0, t = 0;
285    const char *current_date = NULL;
286    time_t cur_time;
287    char hostip[HOSTIPLEN + 1];
# Line 350 | Line 348 | ms_dline(struct Client *client_p, struct
348  
349   #ifdef IPV6
350      if (t == HM_IPV6)
351 <      t = AF_INET6;
351 >      aftype= AF_INET6;
352      else
353   #endif
354 <      t = AF_INET;
354 >      aftype = AF_INET;
355  
356      parse_netmask(dlhost, &daddr, NULL);
357  
358 <    if ((conf = find_dline_conf(&daddr, t)) != NULL)
358 >    if ((conf = find_dline_conf(&daddr, aftype)) != NULL)
359      {
360        creason = conf->reason ? conf->reason : def_reason;
361        if (IsConfExemptKline(conf))

Diff Legend

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