ratox

FIFO based tox client
git clone git://git.2f30.org/ratox
Log | Files | Refs | README | LICENSE

commit 0a86cf57e3495d6f7c7d8565492e02b9c1276326
parent f249076a9c422588cdfdad334325dbd3d29595af
Author: sin <sin@2f30.org>
Date:   Fri, 10 Mar 2017 13:32:49 +0000

Implement quiet mode

Diffstat:
Mconfig.def.h | 1+
Mratox.1 | 5++++-
Mratox.c | 8++++++--
3 files changed, 11 insertions(+), 3 deletions(-)

diff --git 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; diff --git a/ratox.1 b/ratox.1 @@ -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 diff --git a/ratox.c b/ratox.c @@ -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();