about summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bounce.c10
-rw-r--r--pounce.126
2 files changed, 18 insertions, 18 deletions
diff --git a/bounce.c b/bounce.c
index 2b1413d..89b2ff1 100644
--- a/bounce.c
+++ b/bounce.c
@@ -232,16 +232,14 @@ int main(int argc, char *argv[]) {
 	const char *join = NULL;
 	const char *quit = "connection reset by purr";
 
-	const char *Opts = "!A:C:H:K:NP:Q:U:W:a:c:ef:g:h:j:k:n:p:r:s:u:vw:x";
+	const char *Opts = "!C:H:K:NP:U:W:a:c:ef:g:h:j:k:n:p:q:r:s:u:vw:xy:";
 	const struct option LongOpts[] = {
 		{ "insecure", no_argument, NULL, '!' },
-		{ "away", required_argument, NULL, 'A' },
 		{ "cert", required_argument, NULL, 'C' },
 		{ "bind-host", required_argument, NULL, 'H' },
 		{ "priv", required_argument, NULL, 'K' },
 		{ "no-names", no_argument, NULL, 'N' },
 		{ "bind-port", required_argument, NULL, 'P' },
-		{ "quit", required_argument, NULL, 'Q' },
 		{ "bind-path", required_argument, NULL, 'U' },
 		{ "client-pass", required_argument, NULL, 'W' },
 		{ "sasl-plain", required_argument, NULL, 'a' },
@@ -253,11 +251,13 @@ int main(int argc, char *argv[]) {
 		{ "client-priv", required_argument, NULL, 'k' },
 		{ "nick", required_argument, NULL, 'n' },
 		{ "port", required_argument, NULL, 'p' },
+		{ "quit", required_argument, NULL, 'q' },
 		{ "real", required_argument, NULL, 'r' },
 		{ "size", required_argument, NULL, 's' },
 		{ "user", required_argument, NULL, 'u' },
 		{ "verbose", no_argument, NULL, 'v' },
 		{ "pass", required_argument, NULL, 'w' },
+		{ "away", required_argument, NULL, 'y' },
 		{0},
 	};
 
@@ -265,13 +265,11 @@ int main(int argc, char *argv[]) {
 	while (0 < (opt = getopt_config(argc, argv, Opts, LongOpts, NULL))) {
 		switch (opt) {
 			break; case '!': insecure = true;
-			break; case 'A': clientAway = optarg;
 			break; case 'C': strlcpy(certPath, optarg, sizeof(certPath));
 			break; case 'H': bindHost = optarg;
 			break; case 'K': strlcpy(privPath, optarg, sizeof(privPath));
 			break; case 'N': stateNoNames = true;
 			break; case 'P': bindPort = optarg;
-			break; case 'Q': quit = optarg;
 			break; case 'U': strlcpy(bindPath, optarg, sizeof(bindPath));
 			break; case 'W': clientPass = optarg;
 			break; case 'a': sasl = true; plain = optarg;
@@ -284,12 +282,14 @@ int main(int argc, char *argv[]) {
 			break; case 'k': clientPriv = optarg;
 			break; case 'n': nick = optarg;
 			break; case 'p': port = optarg;
+			break; case 'q': quit = optarg;
 			break; case 'r': real = optarg;
 			break; case 's': ringSize = parseSize(optarg);
 			break; case 'u': user = optarg;
 			break; case 'v': verbose = true;
 			break; case 'w': pass = optarg;
 			break; case 'x': hashPass(); return EX_OK;
+			break; case 'y': clientAway = optarg;
 			break; default:  return EX_USAGE;
 		}
 	}
diff --git a/pounce.1 b/pounce.1
index eceb714..06ffc94 100644
--- a/pounce.1
+++ b/pounce.1
@@ -1,4 +1,4 @@
-.Dd December 8, 2019
+.Dd January 7, 2020
 .Dt POUNCE 1
 .Os
 .
@@ -9,12 +9,10 @@
 .Sh SYNOPSIS
 .Nm
 .Op Fl Nev
-.Op Fl A Ar away
 .Op Fl C Ar cert
 .Op Fl H Ar host
 .Op Fl K Ar priv
 .Op Fl P Ar port
-.Op Fl Q Ar quit
 .Op Fl U Ar unix
 .Op Fl W Ar pass
 .Op Fl a Ar auth
@@ -25,10 +23,12 @@
 .Op Fl k Ar priv
 .Op Fl n Ar nick
 .Op Fl p Ar port
+.Op Fl q Ar quit
 .Op Fl r Ar real
 .Op Fl s Ar size
 .Op Fl u Ar user
 .Op Fl w Ar pass
+.Op Fl y Ar away
 .Op Ar config ...
 .
 .Nm
@@ -68,11 +68,6 @@ following their corresponding flags.
 The arguments are as follows:
 .
 .Bl -tag -width Ds
-.It Fl A Ar mesg , Cm away = Ar mesg
-Set away status to
-.Ar mesg
-when no clients are connected.
-.
 .It Fl C Ar path , Cm cert = Ar path
 Load TLS certificate from
 .Ar path .
@@ -111,11 +106,6 @@ Bind to
 .Ar port .
 The default port is 6697.
 .
-.It Fl Q Ar mesg , Cm quit = Ar mesg
-Quit with message
-.Ar mesg
-when shutting down.
-.
 .It Fl U Ar path , Cm bind-path = Ar path
 Bind to a UNIX-domain socket at
 .Ar path .
@@ -210,6 +200,11 @@ Connect to
 .Ar port .
 The default port is 6697.
 .
+.It Fl q Ar mesg , Cm quit = Ar mesg
+Quit with message
+.Ar mesg
+when shutting down.
+.
 .It Fl r Ar real , Cm real = Ar real
 Set realname to
 .Ar real .
@@ -242,6 +237,11 @@ Prompt for a password
 and output a hash
 for use with
 .Fl W .
+.
+.It Fl y Ar mesg , Cm away = Ar mesg
+Set away status to
+.Ar mesg
+when no clients are connected.
 .El
 .
 .Pp