Roxen.git / server / etc / modules / Roxen.pmod

version» Context lines:

Roxen.git/server/etc/modules/Roxen.pmod:1:   /* -  * $Id: Roxen.pmod,v 1.20 2000/07/05 23:09:42 mast Exp $ +  * $Id: Roxen.pmod,v 1.21 2000/07/11 01:47:07 nilsson Exp $    *    * Various helper functions.    *    * Henrik Grubbström 1999-05-03    */      #include <config.h>   inherit "roxenlib";      /*
Roxen.git/server/etc/modules/Roxen.pmod:786:    "Jul":6, "Aug":7, "Sep":8, "Oct":9, "Nov":10, "Dec":11,    "jan":0, "feb":1, "mar":2, "apr":3, "may":4, "jun":5,    "jul":6, "aug":7, "sep":8, "oct":9, "nov":10, "dec":11,]);      #define MAX_SINCE_CACHE 16384   static mapping(string:int) since_cache=([ ]);   array(int) parse_since(string date)   {    if(!date || sizeof(date)<14) return({0,-1});    int t=0, length = -1; -  string dat; +       #if constant(mktime) -  // Tue, 28 Apr 1998 13:31:29 GMT -  sscanf(dat=lower_case(date+"; length="), "%*s, %s; length=%d", dat, length); +  string dat=lower_case(date); +  sscanf(dat+"; length=", "%*s, %s; length=%d", dat, length);       if(!(t=since_cache[dat])) {    int day, year = -1, month, hour, minute, second;    string m;    if(sscanf(dat, "%d-%s-%d %d:%d:%d", day, m, year, hour, minute, second)>2)    {    month=monthnum[m];    } else if(dat[2]==',') { // I bet a buck that this never happens    sscanf(dat, "%*s, %d %s %d %d:%d:%d", day, m, year, hour, minute, second);    month=monthnum[m];