summary refs log tree commit diff
path: root/chat.c
diff options
context:
space:
mode:
authorC. McEnroe2020-02-15 04:54:53 -0500
committerC. McEnroe2020-02-15 04:54:53 -0500
commit42d106260b5e881aad7bc4cf6c73ffb1b30b5abb (patch)
tree3a0ce91447067c10f7b47c3aa3e197545b875639 /chat.c
parent91fa13667206ff43c4541c71eb34d0fb8eb733f7 (diff)
Separate network info from self
Diffstat (limited to 'chat.c')
-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;