summaryrefslogtreecommitdiff
path: root/ratox.c
diff options
context:
space:
mode:
authorsin <sin@2f30.org>2017-03-10 13:32:49 +0000
committerpranomostro <pranomestro@gmail.com>2017-03-10 17:54:55 +0100
commit0a86cf57e3495d6f7c7d8565492e02b9c1276326 (patch)
tree1f39bbd3faa74a851c9e52f5be280e883990a06d /ratox.c
parentf249076a9c422588cdfdad334325dbd3d29595af (diff)
Implement quiet mode
Diffstat (limited to 'ratox.c')
-rw-r--r--ratox.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ratox.c b/ratox.c
index d767630..2130916 100644
--- 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();