pike.git / lib / modules / Calendar.pmod / Events.pmod

version» Context lines:

pike.git/lib/modules/Calendar.pmod/Events.pmod:354:      program|Event.Event `[](string s)   {    return ::`[](s) || magic_event(s);   }   function `-> = `[];      // Don't load Geogrphy.Countries unless we have to   object country_lookup=0;    - Event|Event.Namedays magic_event(string s) + Event.Event|Event.Namedays magic_event(string s)   {    Event.Event e;    if ( (e=loaded_events[s]) ) return e;       s=replace(s,"_"," ");       if (e=find_event(s)) return e;    if (e=find_region(s)) return e;       if (!country_lookup)    country_lookup=master()->resolv("Geography.Countries");    object c=country_lookup->from_name(s);    if (c && (e=find_region(lower_case(c->iso2)))) return e;    -  +  if (s=="tzshift") +  return loaded_events->tzshift=Event.TZShift_Event();       return ([])[0];   }      Event.SuperEvent country(string s)   {    s=replace(s,"_"," ");    return find_region(s);   }      Event.SuperEvent event(string s)   {    s=replace(s,"_"," ");    return find_event(s);   }      mapping made_events=([]);