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 1627 by michael, Thu Nov 1 13:49:25 2012 UTC vs.
Revision 1628 by michael, Thu Nov 1 21:08:56 2012 UTC

# Line 57 | Line 57 | apply_dline(struct Client *source_p, str
57    if (tkline_time)
58    {
59      aconf->hold = CurrentTime + tkline_time;
60    SetConfTemporary(aconf);
60      sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
61                           "%s added temporary %d min. D-Line for [%s] [%s]",
62                           get_oper_name(source_p), tkline_time/60,
# Line 81 | Line 80 | apply_dline(struct Client *source_p, str
80  
81    }
82  
83 +  SetConfDatabase(aconf);
84    aconf->setat = CurrentTime;
85    add_conf_by_address(CONF_DLINE, aconf);
86    rehashed_klines = 1;
# Line 116 | Line 116 | remove_dline_match(const char *host)
116  
117    if ((aconf = find_conf_by_address(host, piphost, CONF_DLINE, t, NULL, NULL, 0)))
118    {
119 <    if (!IsConfMain(aconf))
119 >    if (IsConfDatabase(aconf))
120      {
121        delete_one_address_conf(host, aconf);
122        return 1;
# Line 146 | Line 146 | mo_dline(struct Client *client_p, struct
146    const char *creason;
147    const struct Client *target_p = NULL;
148    struct irc_ssaddr daddr;
149  struct ConfItem *conf=NULL;
149    struct AccessItem *aconf=NULL;
150    time_t tkline_time=0;
151    int bits, t;
# Line 259 | Line 258 | mo_dline(struct Client *client_p, struct
258    if (!valid_comment(source_p, reason, 1))
259      return;
260  
261 <  conf = make_conf_item(DLINE_TYPE);
263 <  aconf = map_to_conf(conf);
261 >  aconf = map_to_conf(make_conf_item(DLINE_TYPE));
262    DupString(aconf->host, dlhost);
263  
264    if (tkline_time != 0)
267  {
265      snprintf(buffer, sizeof(buffer), "Temporary D-line %d min. - %s (%s)",
266               (int)(tkline_time/60), reason, current_date);
270    DupString(aconf->reason, buffer);
271    apply_dline(source_p, aconf, tkline_time);
272  }
267    else
274  {
268      snprintf(buffer, sizeof(buffer), "%s (%s)", reason, current_date);
276    DupString(aconf->reason, buffer);
277    apply_dline(source_p, aconf, 0);
278  }
269  
270 +  DupString(aconf->reason, buffer);
271 +  apply_dline(source_p, aconf, tkline_time);
272    rehashed_klines = 1;
273   }
274  
# Line 289 | Line 281 | ms_dline(struct Client *client_p, struct
281    const char *creason;
282    const struct Client *target_p = NULL;
283    struct irc_ssaddr daddr;
292  struct ConfItem *conf=NULL;
284    struct AccessItem *aconf=NULL;
285    time_t tkline_time=0;
286    int bits, t;
# Line 386 | Line 377 | ms_dline(struct Client *client_p, struct
377      if (!valid_comment(source_p, reason, 1))
378        return;
379  
380 <    conf = make_conf_item(DLINE_TYPE);
390 <    aconf = map_to_conf(conf);
380 >    aconf = map_to_conf(make_conf_item(DLINE_TYPE));
381      DupString(aconf->host, dlhost);
382  
383      if (tkline_time != 0)
394    {
384        snprintf(buffer, sizeof(buffer), "Temporary D-line %d min. - %s (%s)",
385                 (int)(tkline_time/60), reason, current_date);
397      DupString(aconf->reason, buffer);
398      apply_dline(source_p, aconf, tkline_time);
399    }
386      else
401    {
387        snprintf(buffer, sizeof(buffer), "%s (%s)", reason, current_date);
403      DupString(aconf->reason, buffer);
404      apply_dline(source_p, aconf, 0);
405    }
388  
389 +    DupString(aconf->reason, buffer);
390 +    apply_dline(source_p, aconf, tkline_time);
391      rehashed_klines = 1;
392    }
393   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines