X-Git-Url: http://git.cascardo.info/?p=cascardo%2Fpubsub-bot.git;a=blobdiff_plain;f=status.c;fp=status.c;h=83c57d4b1f86e6b7fb10884b694ecd37bbb25e92;hp=b3971c557b7a5b8e01c7bfb99fb7cc9ee8ac98be;hb=d1a29bfd0dbb9d00b3712d02561b6ed9109e6cb7;hpb=2fbe2168497d453bfe27de05aa613077f29d9b72 diff --git a/status.c b/status.c index b3971c5..83c57d4 100644 --- a/status.c +++ b/status.c @@ -21,12 +21,13 @@ #include #include #include +#include static char * server = "vespa.holoscopio.com"; static char * username = "pubsub"; static char * password = "pubsub"; static char * pbservice = "pubsub.vespa.holoscopio.com"; -static const char * authed_jid = "vespa"; +static char * authed_jid = "vespa"; iks * createiq (char *type, char *to, char *qnam, char *xmlns, iks **query) @@ -372,6 +373,28 @@ int main (int argc, char **argv) { iksparser *parser; + int c; + while ((c = getopt (argc, argv, "s:u:p:i:a:")) != -1) + { + switch (c) + { + case 's': + server = optarg; + break; + case 'u': + username = optarg; + break; + case 'p': + password = optarg; + break; + case 'i': + pbservice = optarg; + break; + case 'a': + authed_jid = optarg; + break; + } + } parser = iks_stream_new ("jabber:client", &parser, hook); iks_connect_tcp (parser, server, 5222); while (1)