From 72d96a92f3b912d1ddcf2a0fc494905782ef3fe9 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 26 Feb 2012 17:59:04 +0000 Subject: Added -notls argument and removed server name hack Added jabber_conn struct to represent connections --- main.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index fd45aaa0..a9a8b6b8 100644 --- a/main.c +++ b/main.c @@ -20,16 +20,37 @@ * */ +#include +#include + #include "log.h" #include "windows.h" #include "profanity.h" -int main(void) +int main(int argc, char **argv) { + int disable_tls = 0; + + // more than one argument + if (argc > 2) { + printf("Usage: profanity [-notls]\n"); + return 1; + + // argument is not -notls + } else if (argc == 2) { + char *arg1 = argv[1]; + if (strcmp(arg1, "-notls") != 0) { + printf("Usage: profanity [-notls]\n"); + return 1; + } else { + disable_tls = 1; + } + } + log_init(); gui_init(); - profanity_main(); + profanity_main(disable_tls); gui_close(); log_close(); -- cgit 1.4.1-2-gfad0