pike.git / lib / modules / Geography.pmod / GeoIP.pmod

version» Context lines:

pike.git/lib/modules/Geography.pmod/GeoIP.pmod:28:   }      //! Base class for GeoIP lookups. Use @[Geography.GeoIP.IPv4].   class IP {    object tree;       void parse(string file_name, function(string,object:array) parse_line) {    Stdio.FILE f = Stdio.FILE(file_name, "r");       while (string line = f->gets()) { -  line = String.trim_all_whites(line); +  line = String.trim(line);    if (!sizeof(line)) continue;    parse_line(line, tree);    }    }       //! Returns the geographical location of the given ip address @expr{ip@}.    //! When this object has been created using one of the standard parsing    //! functions the locations are instances of    //! @[Geography.Countries.Country].    mixed from_ip(string ip) {