about summary refs log tree commit diff
path: root/bounce.c
diff options
context:
space:
mode:
Diffstat (limited to 'bounce.c')
-rw-r--r--bounce.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/bounce.c b/bounce.c
index b3d8b33..43d3ef8 100644
--- a/bounce.c
+++ b/bounce.c
@@ -20,6 +20,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <sys/socket.h>
 #include <sysexits.h>
 #include <tls.h>
 #include <unistd.h>
@@ -91,6 +92,15 @@ int main(int argc, char *argv[]) {
 	int bind[BindCap];
 	size_t bindLen = listenBind(bind, BindCap, localHost, localPort);
 
+	int server = serverConnect(host, port);
+	serverLogin(pass, auth, nick, user, real);
+
+	// TODO: Wait for successful login before listening.
+	for (size_t i = 0; i < bindLen; ++i) {
+		int error = listen(bind[i], 1);
+		if (error) err(EX_IOERR, "listen");
+	}
+
 	// Wishing for struct-of-arrays...
 	struct pollfd fds[BindCap];
 	for (size_t i = 0; i < bindLen; ++i) {
'2018-09-17 18:02:46 -0400'>2018-09-17Add tRNS support to pngoJune McEnroe 2018-09-11Move gfx man pages to gfx/manJune McEnroe 2018-09-11Move bin man pages to bin/manJune McEnroe 2018-09-11Rewrite gfx.7 and render plaintext READMEJune McEnroe 2018-09-11Remove GAMES from BINSJune McEnroe 2018-09-11Rewrite bin.7 and render to plaintext READMEJune McEnroe 2018-09-11Add "blank" lines to man pagesJune McEnroe 2018-09-10Add mdoc syntax fileJune McEnroe 2018-09-08Fix Nm usage in multi-name man pagesJune McEnroe 2018-09-08Put real dates on man pagesJune McEnroe 2018-09-08Replace gfx README with REAMDE.7June McEnroe 2018-09-08Link gfx man pages in ~/.localJune McEnroe