/[svn]/ircd-hybrid-7.3/src/s_conf.c
ViewVC logotype

Diff of /ircd-hybrid-7.3/src/s_conf.c

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

revision 1119 by michael, Fri Jan 7 22:01:47 2011 UTC revision 1120 by michael, Sun Jan 9 09:58:25 2011 UTC
# Line 3114  conf_yy_fatal_error(const char *msg) Line 3114  conf_yy_fatal_error(const char *msg)
3114   * Originally written by Dianora (Diane, db@db.net)   * Originally written by Dianora (Diane, db@db.net)
3115   */   */
3116  time_t  time_t
3117  valid_tkline(char *p, int minutes)  valid_tkline(const char *p, int minutes)
3118  {  {
3119    time_t result = 0;    time_t result = 0;
3120    
3121    while (*p)    for (; *p; ++p)
3122    {    {
3123      if (IsDigit(*p))      if (!IsDigit(*p))
3124      {        return;
3125        result *= 10;  
3126        result += ((*p) & 0xF);      result *= 10;
3127        p++;      result += ((*p) & 0xF);
     }  
     else  
       return 0;  
3128    }    }
3129    
3130    /* in the degenerate case where oper does a /quote kline 0 user@host :reason    /*
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     * 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     * as a return value of non-zero is used to flag it as a temporary kline
3134     */     */
   
3135    if (result == 0)    if (result == 0)
3136      result = 1;      result = 1;
3137    

Legend:
Removed from v.1119  
changed lines
  Added in v.1120

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