From e0d292cb2fd1b535d601cfc45c370533919c8420 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Wed, 23 Oct 2019 00:16:31 -0400 Subject: Add state --- bounce.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bounce.c') diff --git a/bounce.c b/bounce.c index 43d3ef8..ec89945 100644 --- a/bounce.c +++ b/bounce.c @@ -95,7 +95,11 @@ int main(int argc, char *argv[]) { int server = serverConnect(host, port); serverLogin(pass, auth, nick, user, real); - // TODO: Wait for successful login before listening. + while (!stateReady()) { + serverRecv(); + } + if (join) serverJoin(join); + for (size_t i = 0; i < bindLen; ++i) { int error = listen(bind[i], 1); if (error) err(EX_IOERR, "listen"); -- cgit 1.4.1