summaryrefslogtreecommitdiff
path: root/blabouncer.c
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-07-18 21:37:51 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-07-18 21:42:01 +0100
commit165cb674c689b1c779a357cd20467844c855e93e (patch)
tree042a03e2f65a815526f5f68b299291f7e5f55670 /blabouncer.c
parent1702786389a71b28aac9c2f66dc27fa02889de22 (diff)
Release version 0.1!v0.1
Also add version information (client welcome message, -v, and --version).
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;
}