about summary refs log tree commit diff
path: root/client.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-11-06 17:18:05 -0500
committerJune McEnroe <june@causal.agency>2019-11-06 17:18:05 -0500
commitd8cd384622fe8b00c7c257814cfcfec59d1e928e (patch)
tree9322caa699402b6f0dc92dcbd3c6fe444f248d1c /client.c
parentDeclare more missing functions and deal with lack of SO_NOSIGPIPE (diff)
downloadpounce-d8cd384622fe8b00c7c257814cfcfec59d1e928e.tar.gz
pounce-d8cd384622fe8b00c7c257814cfcfec59d1e928e.zip
Use #defines for constant strings
GCC hates declaring static consts in headers and not using them, for
some stupid reason.
Diffstat (limited to '')
-rw-r--r--client.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/client.c b/client.c
index 8e4ed8e..3e8b15b 100644
--- a/client.c
+++ b/client.c
@@ -93,7 +93,7 @@ static void passRequired(struct Client *client) {
 		client,
 		":%s 464 * :Password incorrect\r\n"
 		"ERROR :Password incorrect\r\n",
-		Origin
+		ORIGIN
 	);
 	client->error = true;
 }
@@ -150,25 +150,25 @@ static void handleCap(struct Client *client, struct Message *msg) {
 
 	} else if (!strcmp(msg->params[0], "LS")) {
 		if (client->need) client->need |= NeedCapEnd;
-		clientFormat(client, ":%s CAP * LS :server-time\r\n", Origin);
+		clientFormat(client, ":%s CAP * LS :server-time\r\n", ORIGIN);
 
 	} else if (!strcmp(msg->params[0], "REQ") && msg->params[1]) {
 		if (client->need) client->need |= NeedCapEnd;
 		if (!strcmp(msg->params[1], "server-time")) {
 			client->serverTime = true;
-			clientFormat(client, ":%s CAP * ACK :server-time\r\n", Origin);
+			clientFormat(client, ":%s CAP * ACK :server-time\r\n", ORIGIN);
 		} else {
-			clientFormat(client, ":%s CAP * NAK :%s\r\n", Origin, msg->params[1]);
+			clientFormat(client, ":%s CAP * NAK :%s\r\n", ORIGIN, msg->params[1]);
 		}
 
 	} else if (!strcmp(msg->params[0], "LIST")) {
 		clientFormat(
 			client, ":%s CAP * LIST :%s\r\n",
-			Origin, (client->serverTime ? "server-time" : "")
+			ORIGIN, (client->serverTime ? "server-time" : "")
 		);
 
 	} else {
-		clientFormat(client, ":%s 410 * :Invalid CAP subcommand\r\n", Origin);
+		clientFormat(client, ":%s 410 * :Invalid CAP subcommand\r\n", ORIGIN);
 	}
 }