summary refs log tree commit diff
path: root/chat.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-15 04:54:53 -0500
committerJune McEnroe <june@causal.agency>2020-02-15 04:54:53 -0500
commit42d106260b5e881aad7bc4cf6c73ffb1b30b5abb (patch)
tree3a0ce91447067c10f7b47c3aa3e197545b875639 /chat.c
parentAdd /ns and /cs (diff)
downloadcatgirl-42d106260b5e881aad7bc4cf6c73ffb1b30b5abb.tar.gz
catgirl-42d106260b5e881aad7bc4cf6c73ffb1b30b5abb.zip
Separate network info from self
Diffstat (limited to '')
-rw-r--r--chat.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/chat.c b/chat.c
index fd1d33e..318a379 100644
--- a/chat.c
+++ b/chat.c
@@ -65,6 +65,7 @@ enum Color idColors[IDCap] = {
 
 size_t idNext = Network + 1;
 
+struct Network network;
 struct Self self = { .color = Default };
 
 static const char *save;
@@ -187,10 +188,10 @@ int main(int argc, char *argv[]) {
 	if (!user) user = nick;
 	if (!real) real = nick;
 
+	set(&network.name, host);
+	set(&network.chanTypes, "#&");
+	set(&network.prefixes, "@+");
 	set(&self.nick, "*");
-	set(&self.network, host);
-	set(&self.chanTypes, "#&");
-	set(&self.prefixes, "@+");
 	commandComplete();
 
 	FILE *certFile = NULL;