diff options
author | C. McEnroe | 2020-02-01 19:37:48 -0500 |
---|---|---|
committer | C. McEnroe | 2020-02-01 19:37:55 -0500 |
commit | e5363bcae0f726455fb4198cd21d46721ad5e39a (patch) | |
tree | a4f191af1fe34b16663247fad0784476311dde8c /chat.c | |
parent | e289ff6b18e643eea4c72e04f7c0dc6ff768a335 (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.c | 8 |
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(); } } |