From 437162dca3dff21272328908054b37b19351a228 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Sat, 26 Oct 2019 22:15:47 -0400 Subject: Wait for AUTHENTICATE + from server --- server.c | 7 +------ state.c | 6 ++++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/server.c b/server.c index 3dec684..964b15b 100644 --- a/server.c +++ b/server.c @@ -159,12 +159,7 @@ void serverLogin( void serverAuth(void) { assert(authPlain); - serverFormat( - "AUTHENTICATE PLAIN\r\n" - "AUTHENTICATE %s\r\n" - "CAP END\r\n", - authPlain - ); + serverFormat("AUTHENTICATE %s\r\nCAP END\r\n", authPlain); free(authPlain); authPlain = NULL; } diff --git a/state.c b/state.c index fa9c77b..ee3ae78 100644 --- a/state.c +++ b/state.c @@ -122,6 +122,11 @@ static void handleCap(struct Message *msg) { bool ack = msg->params[1] && !strcmp(msg->params[1], "ACK"); bool sasl = msg->params[2] && !strncmp(msg->params[2], "sasl", 4); if (!ack || !sasl) errx(EX_CONFIG, "server does not support SASL"); + serverFormat("AUTHENTICATE PLAIN\r\n"); +} + +static void handleAuthenticate(struct Message *msg) { + (void)msg; serverAuth(); } @@ -221,6 +226,7 @@ static const struct { { "004", handleReplyMyInfo }, { "005", handleReplyISupport }, { "332", handleReplyTopic }, + { "AUTHENTICATE", handleAuthenticate }, { "CAP", handleCap }, { "ERROR", handleError }, { "JOIN", handleJoin }, -- cgit 1.4.1
path: root/home (unfollow)
Commit message (Expand)Author
2022-07-26Rewrite glitch from new pngoJune McEnroe
2022-07-26Update Care with time-to-ID and piercingsJune McEnroe
2022-07-26Add -w to upJune McEnroe
2022-07-13Set push.autoSetupRemoteJune McEnroe
2022-07-08Remove TOURJune McEnroe
2022-07-03Add The Bone Shard EmperorJune McEnroe
2022-06-25Bump xterm font size to 12June McEnroe
2022-06-10Handle subshells (and functions) inside substitutionsJune McEnroe
2022-06-10Switch to jorts Install scriptJune McEnroe
2022-06-08Indicate if still reading or no resultsJune McEnroe
2022-06-08Add Maiden, Mother, CroneJune McEnroe
2022-06-05FIRST SHOW IN 2.5 YEARS BABEY!!!June McEnroe
2022-06-03Set line number on File linesJune McEnroe
2022-06-03Stop polling stdin after EOFJune McEnroe
2022-06-02Set TABSIZE=4June McEnroe
2022-06-02Do basic match highlightingJune McEnroe
2022-06-02Clean up parsing a littleJune McEnroe
2022-06-02Don't duplicate path stringJune McEnroe
2022-06-02Use stderr instead of /dev/tty, realloc buffer if lines too longJune McEnroe
2022-06-02Add initial working version of qfJune McEnroe
2022-05-29Set prompt for okshJune McEnroe