pike.git / lib / modules / Protocols.pmod / DNS.pmod

version» Context lines:

pike.git/lib/modules/Protocols.pmod/DNS.pmod:1: - // $Id: DNS.pmod,v 1.87 2005/03/01 17:20:44 nilsson Exp $ + // $Id: DNS.pmod,v 1.88 2006/11/04 19:06:49 nilsson Exp $   // Not yet finished -- Fredrik Hubinette      //! Domain Name System   //! RFC 1035      #pike __REAL_VERSION__      constant NOERROR=0;   constant FORMERR=1;   constant SERVFAIL=2;
pike.git/lib/modules/Protocols.pmod/DNS.pmod:791:    domains = ({ domain }) + domains;   #endif    nameservers -= ({ "" });    if (!sizeof(nameservers)) {    /* Try localhost... */    nameservers = ({ "127.0.0.1" });    }    domains -= ({ "" });    domains = Array.map(domains, lambda(string d) {    if (d[-1] == '.') { -  return d[..sizeof(d)-2]; +  return d[..<1];    }    return d;    });    }    else    {    if(arrayp(server))    nameservers = server;    else    nameservers = ({ server });