summary refs log tree commit diff
path: root/bounce.h
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-10-23 19:53:26 -0400
committerJune McEnroe <june@causal.agency>2019-10-23 19:53:26 -0400
commitb28f675d5b506edf750eecbdb6e677aac4a27bbf (patch)
treed73364c0ad0fb3c06d7d71549f1333a968b1bb10 /bounce.h
parentSynchronize state after client registration (diff)
downloadpounce-b28f675d5b506edf750eecbdb6e677aac4a27bbf.tar.gz
pounce-b28f675d5b506edf750eecbdb6e677aac4a27bbf.zip
Rename Command to Message
Diffstat (limited to 'bounce.h')
-rw-r--r--bounce.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/bounce.h b/bounce.h
index fd64a27..7b9f4f8 100644
--- a/bounce.h
+++ b/bounce.h
@@ -32,24 +32,24 @@
 bool verbose;
 
 enum { ParamCap = 15 };
-struct Command {
+struct Message {
 	const char *origin;
-	const char *name;
+	const char *cmd;
 	const char *params[ParamCap];
 };
 
-static inline struct Command parse(char *line) {
-	struct Command cmd = {0};
-	if (line[0] == ':') cmd.origin = 1 + strsep(&line, " ");
-	cmd.name = strsep(&line, " ");
+static inline struct Message parse(char *line) {
+	struct Message msg = {0};
+	if (line[0] == ':') msg.origin = 1 + strsep(&line, " ");
+	msg.cmd = strsep(&line, " ");
 	for (size_t i = 0; line && i < ParamCap; ++i) {
 		if (line[0] == ':') {
-			cmd.params[i] = &line[1];
+			msg.params[i] = &line[1];
 			break;
 		}
-		cmd.params[i] = strsep(&line, " ");
+		msg.params[i] = strsep(&line, " ");
 	}
-	return cmd;
+	return msg;
 }
 
 void listenConfig(const char *cert, const char *priv);