summary refs log tree commit diff
path: root/handle.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--handle.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/handle.c b/handle.c
index 422cd76..4383cb0 100644
--- a/handle.c
+++ b/handle.c
@@ -1228,17 +1228,17 @@ static int compar(const void *cmd, const void *_handler) {
 	return strcmp(cmd, handler->cmd);
 }
 
-void handle(struct Message msg) {
-	if (!msg.cmd) return;
-	if (msg.tags[TagPos]) {
-		self.pos = strtoull(msg.tags[TagPos], NULL, 10);
+void handle(struct Message *msg) {
+	if (!msg->cmd) return;
+	if (msg->tags[TagPos]) {
+		self.pos = strtoull(msg->tags[TagPos], NULL, 10);
 	}
 	const struct Handler *handler = bsearch(
-		msg.cmd, Handlers, ARRAY_LEN(Handlers), sizeof(*handler), compar
+		msg->cmd, Handlers, ARRAY_LEN(Handlers), sizeof(*handler), compar
 	);
 	if (handler) {
-		handler->fn(&msg);
-	} else if (strcmp(msg.cmd, "400") >= 0 && strcmp(msg.cmd, "599") <= 0) {
-		handleErrorGeneric(&msg);
+		handler->fn(msg);
+	} else if (strcmp(msg->cmd, "400") >= 0 && strcmp(msg->cmd, "599") <= 0) {
+		handleErrorGeneric(msg);
 	}
 }
href='/catgirl/commit/url.c?h=2.2a&id=d73085eaa93a0217a679556f7a37a80421877b69&follow=1'>Allow for arguments to open/copy utilitiesJune McEnroe 2020-02-12Handle RPL_AWAYJune McEnroe 2020-02-11Support monochromatic terminalsJune McEnroe 2020-02-11Add .gz to chroot-man scriptJune McEnroe 2020-02-11Add -R restricted flagJune McEnroe 2020-02-11Add chroot targetJune McEnroe 2020-02-11Exit focus and paste modes on err exitJune McEnroe 2020-02-11Add startup GPLv3 note and URLJune McEnroe 2020-02-11Make sure -D_GNU_SOURCE ends up in CFLAGS on LinuxJune McEnroe 2020-02-11Add note about setting PKG_CONFIG_PATHJune McEnroe 2020-02-11Rename query ID on nick changeJune McEnroe 2020-02-11Call completeClear when closing a windowJune McEnroe 2020-02-11Don't insert color codes for non-mentionsJune McEnroe 2020-02-11Take first two words in colorMentionsJune McEnroe 2020-02-11Use time_t for save signatureJune McEnroe 2020-02-11Set self.nick to * initiallyJune McEnroe 2020-02-11Define ColorCap instead of hardcoding 100June McEnroe 2020-02-11Move hash to top of chat.hJune McEnroe 2020-02-11Move base64 out of chat.hJune McEnroe 2020-02-11Move XDG_SUBDIR out of chat.hJune McEnroe 2020-02-11Fix whois idle unit calculationJune McEnroe 2020-02-11Cast towupper to wchar_tJune McEnroe 2020-02-11Cast set but unused variables to voidJune McEnroe 2020-02-11Declare strlcatJune McEnroe 2020-02-11Check if VDSUSP existsJune McEnroe 2020-02-11Fix completeReplace iterationJune McEnroe 2020-02-11Use pkg(8) to configure on FreeBSDJune McEnroe 2020-02-11Remove legacy codeJune McEnroe 2020-02-11Add INSTALLING section to READMEJune McEnroe