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

Comparing ircd-hybrid-7.3/src/s_conf.c (file contents):
Revision 1119 by michael, Fri Jan 7 22:01:47 2011 UTC vs.
Revision 1120 by michael, Sun Jan 9 09:58:25 2011 UTC

# Line 3114 | Line 3114 | conf_yy_fatal_error(const char *msg)
3114   * Originally written by Dianora (Diane, db@db.net)
3115   */
3116   time_t
3117 < valid_tkline(char *p, int minutes)
3117 > valid_tkline(const char *p, int minutes)
3118   {
3119    time_t result = 0;
3120  
3121 <  while (*p)
3121 >  for (; *p; ++p)
3122    {
3123 <    if (IsDigit(*p))
3124 <    {
3125 <      result *= 10;
3126 <      result += ((*p) & 0xF);
3127 <      p++;
3128 <    }
3129 <    else
3130 <      return 0;
3123 >    if (!IsDigit(*p))
3124 >      return;
3125 >
3126 >    result *= 10;
3127 >    result += ((*p) & 0xF);
3128    }
3129  
3130 <  /* in the degenerate case where oper does a /quote kline 0 user@host :reason
3130 >  /*
3131 >   * In the degenerate case where oper does a /quote kline 0 user@host :reason
3132     * i.e. they specifically use 0, I am going to return 1 instead
3133     * as a return value of non-zero is used to flag it as a temporary kline
3134     */
3137 –
3135    if (result == 0)
3136      result = 1;
3137  

Diff Legend

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