diff options
author | sin <sin@2f30.org> | 2017-03-10 13:32:49 +0000 |
---|---|---|
committer | pranomostro <pranomestro@gmail.com> | 2017-03-10 17:54:55 +0100 |
commit | 0a86cf57e3495d6f7c7d8565492e02b9c1276326 (patch) | |
tree | 1f39bbd3faa74a851c9e52f5be280e883990a06d | |
parent | f249076a9c422588cdfdad334325dbd3d29595af (diff) |
Implement quiet mode
-rw-r--r-- | config.def.h | 1 | ||||
-rw-r--r-- | ratox.1 | 5 | ||||
-rw-r--r-- | ratox.c | 8 |
3 files changed, 11 insertions, 3 deletions
diff --git a/config.def.h b/config.def.h index e98c1ed..bb619fc 100644 --- a/config.def.h +++ b/config.def.h @@ -30,6 +30,7 @@ static int ipv6 = 0; static int tcp = 0; static int proxy = 0; static TOX_PROXY_TYPE proxytype = TOX_PROXY_TYPE_SOCKS5; /* NONE, HTTP, SOCKS5 */ +static int quiet = 0; static char proxyaddr[] = "localhost"; static uint16_t proxyport = 8080; @@ -1,4 +1,4 @@ -.Dd December 8, 2014 +.Dd March 10, 2017 .Dt RATOX 1 .Os .Sh NAME @@ -10,6 +10,7 @@ .Op Fl E | Fl e .Op Fl T | Fl t .Op Fl P | Fl p +.Op Fl q .Op Ar savefile .Sh DESCRIPTION .Nm @@ -26,6 +27,8 @@ Enable/Disable TCP mode. Avoiding UDP in tox implies certain security considerations. .It Fl P p Enable/Disable TCP HTTP/SOCKS5 proxy as specified in \fIconfig.h\fR. +.It Fl q +Enable quiet mode. .It Ar savefile Path of the file to load a profile from or create a new one in. .El @@ -2293,7 +2293,7 @@ toxshutdown(void) static void usage(void) { - eprintf("usage: %s [-4|-6] [-E|-e] [-T|-t] [-P|-p] [savefile]\n", argv0); + eprintf("usage: %s [-4|-6] [-E|-e] [-T|-t] [-P|-p] [-q] [savefile]\n", argv0); } int @@ -2324,6 +2324,9 @@ main(int argc, char *argv[]) case 'p': proxy = 0; break; + case 'q': + quiet = 1; + break; default: usage(); } ARGEND; @@ -2341,7 +2344,8 @@ main(int argc, char *argv[]) signal(SIGTERM, initshutdown); signal(SIGPIPE, SIG_IGN); - printrat(); + if (!quiet) + printrat(); toxinit(); localinit(); friendload(); |