summary refs log tree commit diff
path: root/bounce.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-10-23 00:16:31 -0400
committerJune McEnroe <june@causal.agency>2019-10-23 00:16:31 -0400
commite0d292cb2fd1b535d601cfc45c370533919c8420 (patch)
treed58f25c659ca993aa7c3c7716010f2505f120985 /bounce.c
parentAdd README.7 (diff)
downloadpounce-e0d292cb2fd1b535d601cfc45c370533919c8420.tar.gz
pounce-e0d292cb2fd1b535d601cfc45c370533919c8420.zip
Add state
Diffstat (limited to 'bounce.c')
-rw-r--r--bounce.c6
1 files changed, 5 insertions, 1 deletions
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");