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

Bugfix: the "-mx" option would incorrectly be passed as the IP address.

parent 19d4e13b
No related branches found
No related tags found
No related merge requests found
......@@ -19,10 +19,13 @@ function writeln(str)
}
var mx_record;
var ip_address;
for(i=0;i<argc;i++)
for(i=1;i<argc;i++)
if(argv[i].toLowerCase()=="-mx")
mx_record = argv[i+1];
mx_record = argv[++i];
else
ip_address = argv[i];
for(h in host_list) {
sock = new Socket();
......@@ -48,8 +51,8 @@ for(h in host_list) {
writeln(argv[0]);
break;
case "ip?":
if(argv[1])
writeln(argv[1]);
if(ip_address)
writeln(ip_address);
else
writeln("");
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment