summary refs log tree commit diff
path: root/chat.h
diff options
context:
space:
mode:
Diffstat (limited to 'chat.h')
-rw-r--r--chat.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/chat.h b/chat.h
index 275fef9..f9de779 100644
--- a/chat.h
+++ b/chat.h
@@ -65,12 +65,21 @@ enum Cap {
 
 extern struct Self {
 	bool debug;
+	char *plain;
 	const char *join;
 	enum Cap caps;
-	char *plain;
+	char *network;
+	char *chanTypes;
+	char *prefixes;
 	char *nick;
 } self;
 
+static inline void set(char **field, const char *value) {
+	free(*field);
+	*field = strdup(value);
+	if (!*field) err(EX_OSERR, "strdup");
+}
+
 #define ENUM_TAG \
 	X("time", TagTime)
 
an title='2020-06-07 14:34:29 -0400'>2020-06-07Add OpenBSD to install.shJune McEnroe 2020-06-03Add The Song of AchillesJune McEnroe 2020-06-01Allow redirecting input in everJune McEnroe 2020-05-31Add %c conversion to c scriptJune McEnroe 2020-05-31Add c script to READMEJune McEnroe 2020-05-31Add c scriptJune McEnroe 2020-05-31Update mdoc source URLsJune McEnroe 2020-05-26Remove unfinished PSF fontsJune McEnroe