summary refs log tree commit diff
path: root/chat.c
diff options
context:
space:
mode:
authorC. McEnroe2020-02-01 19:37:48 -0500
committerC. McEnroe2020-02-01 19:37:55 -0500
commite5363bcae0f726455fb4198cd21d46721ad5e39a (patch)
treea4f191af1fe34b16663247fad0784476311dde8c /chat.c
parente289ff6b18e643eea4c72e04f7c0dc6ff768a335 (diff)
Implement the beginnings of UI
It takes so much code to do anything in curses...
Diffstat (limited to 'chat.c')
-rw-r--r--chat.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/chat.c b/chat.c
index 462faa0..47227d5 100644
--- a/chat.c
+++ b/chat.c
@@ -15,6 +15,7 @@
  */
 
 #include <err.h>
+#include <locale.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -33,6 +34,8 @@ size_t idNext = Network + 1;
 struct Self self;
 
 int main(int argc, char *argv[]) {
+	setlocale(LC_CTYPE, "");
+
 	bool insecure = false;
 	const char *host = NULL;
 	const char *port = "6697";
@@ -71,6 +74,10 @@ int main(int argc, char *argv[]) {
 	if (!real) real = nick;
 
 	ircConfig(insecure, cert, priv);
+
+	uiInit();
+	uiFormat(Network, Cold, NULL, "Traveling...");
+	uiDraw();
 	
 	int irc = ircConnect(host, port);
 	if (pass) ircFormat("PASS :%s\r\n", pass);
@@ -80,6 +87,7 @@ int main(int argc, char *argv[]) {
 	ircFormat("USER %s 0 * :%s\r\n", user, real);
 
 	for (;;) {
+		uiDraw();
 		ircRecv();
 	}
 }