Skip to content
Snippets Groups Projects
Commit 19d4e13b authored by rswindell's avatar rswindell
Browse files

Changed first attempt host name to dyndns.synchro.net.

Added support for optional MX records (add "-mx address" to dyndns cmdline).
parent b5684cfc
Branches
Tags
No related merge requests found
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
// $Id$ // $Id$
// usage: ?dyndns <password> // usage: ?dyndns <password> [ip_address] [-mx address]
const REVISION = "$Revision$".split(' ')[1]; const REVISION = "$Revision$".split(' ')[1];
printf("Synchronet Dynamic DNS Client %s\r\n", REVISION); printf("Synchronet Dynamic DNS Client %s\r\n", REVISION);
host_list=["vert.synchro.net", "rob.synchro.net", "bbs.synchro.net", "cvs.synchro.net"]; host_list=["dyndns.synchro.net", "rob.synchro.net", "bbs.synchro.net", "cvs.synchro.net"];
function writeln(str) function writeln(str)
{ {
...@@ -18,6 +18,12 @@ function writeln(str) ...@@ -18,6 +18,12 @@ function writeln(str)
print(str); print(str);
} }
var mx_record;
for(i=0;i<argc;i++)
if(argv[i].toLowerCase()=="-mx")
mx_record = argv[i+1];
for(h in host_list) { for(h in host_list) {
sock = new Socket(); sock = new Socket();
if( (this.server != undefined) && if( (this.server != undefined) &&
...@@ -47,6 +53,12 @@ for(h in host_list) { ...@@ -47,6 +53,12 @@ for(h in host_list) {
else else
writeln(""); writeln("");
break; break;
case "mx?":
if(mx_record)
writeln(mx_record);
else
writeln("");
break;
default: default:
writeln(""); writeln("");
break; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment