diff --git a/main.d b/main.d index dc8041d..2277e08 100644 --- a/main.d +++ b/main.d @@ -1,14 +1,13 @@ -import std.stdio, std.json, std.getopt; +import std.stdio, std.json; import std.net.curl, std.conv: to; import core.stdc.stdlib: exit; -void main(string[] args) { - string serverName; - try getopt(args, config.required, "server|s", "Matrix server domain", &serverName); - catch (GetOptException e) { - writeln(e.msg); +void main(string[] arg) { + if (arg.length < 2) { + writefln("Missing server name. Specify it by following example: '%s ebloid.ru'", arg[0]); exit(1); } + string serverName = arg[1]; CHECK: serverName = "https://"~serverName;