summaryrefslogtreecommitdiff
path: root/blabouncer.c
diff options
context:
space:
mode:
Diffstat (limited to 'blabouncer.c')
-rw-r--r--blabouncer.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/blabouncer.c b/blabouncer.c
index 119e725..ecd8d00 100644
--- a/blabouncer.c
+++ b/blabouncer.c
@@ -864,9 +864,16 @@ int main(int argc, char *argv[]) {
// TODO - Do better command line argument handling (no required order)
char helptext[] = "usage: %s [-f] [-c /path/to/blabouncer.conf] (-f for foreground mode)\n";
if (argc == 2) {
- if (strcmp(argv[1], "-f")) {
+ if (strcmp(argv[1], "-f") && strcmp(argv[1], "-v") && strcmp(argv[1], "--version")) {
fprintf(stderr, helptext, argv[0]);
exit(1);
+ } else if (!strcmp(argv[1], "-v") || !strcmp(argv[1], "--version")) {
+ printf("blabouncer version %s\n", VERSION);
+ printf("Copyright (C) 2019 Luke Bratch <luke@bratch.co.uk>.\n");
+ printf("blabouncer is free software, and you are welcome to redistribute it under\n");
+ printf("the terms of the GNU General Public License, version 3.\n");
+ printf("See the file named COPYING for details.\n");
+ exit(0);
} else {
settings.background = 0;
}