/[svn]/ircd-hybrid/branches/8.2.x/modules/m_dline.c
ViewVC logotype

Diff of /ircd-hybrid/branches/8.2.x/modules/m_dline.c

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

revision 4671 by michael, Tue Sep 23 14:53:00 2014 UTC revision 4672 by michael, Sun Sep 28 17:26:43 2014 UTC
# Line 241  mo_dline(struct Client *source_p, int pa Line 241  mo_dline(struct Client *source_p, int pa
241    
242    current_date = smalldate(0);    current_date = smalldate(0);
243    
   if (!valid_comment(source_p, reason, 1))  
     return 0;  
   
244    conf = conf_make(CONF_DLINE);    conf = conf_make(CONF_DLINE);
245    conf->host = xstrdup(dlhost);    conf->host = xstrdup(dlhost);
246    
247    if (tkline_time)    if (tkline_time)
248      snprintf(buffer, sizeof(buffer), "Temporary D-line %d min. - %s (%s)",      snprintf(buffer, sizeof(buffer), "Temporary D-line %d min. - %.*s (%s)",
249               (int)(tkline_time/60), reason, current_date);               (int)(tkline_time/60), REASONLEN, reason, current_date);
250    else    else
251      snprintf(buffer, sizeof(buffer), "%s (%s)", reason, current_date);      snprintf(buffer, sizeof(buffer), "%s (%.*s)", REASONLEN, reason, current_date);
252    
253    conf->reason = xstrdup(buffer);    conf->reason = xstrdup(buffer);
254    apply_dline(source_p, conf, tkline_time);    apply_dline(source_p, conf, tkline_time);
# Line 324  ms_dline(struct Client *source_p, int pa Line 321  ms_dline(struct Client *source_p, int pa
321    
322      current_date = smalldate(0);      current_date = smalldate(0);
323    
     if (!valid_comment(source_p, reason, 1))  
       return 0;  
   
324      conf = conf_make(CONF_DLINE);      conf = conf_make(CONF_DLINE);
325      conf->host = xstrdup(dlhost);      conf->host = xstrdup(dlhost);
326    
327      if (tkline_time)      if (tkline_time)
328        snprintf(buffer, sizeof(buffer), "Temporary D-line %d min. - %s (%s)",        snprintf(buffer, sizeof(buffer), "Temporary D-line %d min. - %.*s (%s)",
329                 (int)(tkline_time/60), reason, current_date);                 (int)(tkline_time/60), REASONLEN, reason, current_date);
330      else      else
331        snprintf(buffer, sizeof(buffer), "%s (%s)", reason, current_date);        snprintf(buffer, sizeof(buffer), "%.*s (%s)", REASONLEN, reason, current_date);
332    
333      conf->reason = xstrdup(buffer);      conf->reason = xstrdup(buffer);
334      apply_dline(source_p, conf, tkline_time);      apply_dline(source_p, conf, tkline_time);

Legend:
Removed from v.4671  
changed lines
  Added in v.4672

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