about summary refs log tree commit diff
path: root/client.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-11-20 17:43:51 -0500
committerJune McEnroe <june@causal.agency>2020-11-20 17:43:51 -0500
commitfaebbec64b4b36f608dbb0af20b5763ba1281b9b (patch)
treed15f99eff59f0cd2de23700aa78da3b76a82ee0d /client.c
parentOnly allow clients to AUTHENTICATE if using a cert (diff)
downloadpounce-faebbec64b4b36f608dbb0af20b5763ba1281b9b.tar.gz
pounce-faebbec64b4b36f608dbb0af20b5763ba1281b9b.zip
Add lazy client registration timeout
I don't think this is worth adding a configuration option for since real
clients will definitely accomplish registration faster than 10s and it's
long enough to even type out manually for testing.
Diffstat (limited to 'client.c')
-rw-r--r--client.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/client.c b/client.c
index ea28d82..7b0abba 100644
--- a/client.c
+++ b/client.c
@@ -54,6 +54,7 @@ struct Client *clientAlloc(int sock, struct tls *tls) {
 	fcntl(sock, F_SETFL, O_NONBLOCK);
 	client->sock = sock;
 	client->tls = tls;
+	client->time = time(NULL);
 	client->need = NeedHandshake | NeedNick | NeedUser;
 	if (clientPass) client->need |= NeedPass;
 	return client;