Sat, 08 May 2010 19:29:23 +0100
Show help automatically when no arguments presented, show error when no server address is given.
xmpp-fingerprint.lua | file | annotate | diff | comparison | revisions |
--- a/xmpp-fingerprint.lua Sat May 08 19:28:35 2010 +0100 +++ b/xmpp-fingerprint.lua Sat May 08 19:29:23 2010 +0100 @@ -70,7 +70,17 @@ return process_args(arg); end end -process_args(arg); +if #arg > 0 then + process_args(arg); +else + flags.help(); + os.exit(1); +end + +if not server then + io.stderr:write("ERROR: No server address specified.\n"); + os.exit(1); +end local received_cache = {}; local function _test(server, port, question, answer)