[Turn off line numbering]1: var host, curr, h, port; 2: 3: curr = .current_ports(); 4: if ((h = find h in (curr) where (listlen(h) == 2))) { 5: [port, host] = curr[h]; 6: host = $dns.hostname(host); 7: } else { 8: host = $dns.hostname(""); 9: port = curr[1][1]; 10: } 11: if (port != 80) 12: site_url = host + ":" + port; 13: else 14: site_url = host; 15: return site_url;
// Created 22-Aug-1995 as a part of ColdCore, see: @help Credit