From a48436eacafa3c0110f10f8623e663e39beeb34b Mon Sep 17 00:00:00 2001 From: Tobias Girstmair Date: Fri, 3 May 2024 18:56:40 +0200 Subject: [PATCH] use IRCv3 USER command * mode must be '0' * if the client's host does not expose an ident server, the username should be prefixed by '~' living standard document: https://modern.ircdocs.horse/#user-message --- ircpipe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ircpipe.c b/ircpipe.c index 370db4e..9a2b2c8 100644 --- a/ircpipe.c +++ b/ircpipe.c @@ -152,7 +152,7 @@ int irc_base64(char *buf, int n) { int irc_setup(const sock_t sock, const int outfd, const char *nick, const char *pass, int pass_type, const char *chan) { char buf[BUFSIZ]; - int n, mode = 0; /* mode: 1<<3=invisible | 1<<2=wallops */ + int n; struct pollfd fds[1]; fds[0].fd = sock.fd; fds[0].events = POLLIN; @@ -167,7 +167,7 @@ int irc_setup(const sock_t sock, const int outfd, const char *nick, const char * n = snprintf(buf, BUFSIZ, "NICK %s\r\n", nick); WRITE(sock, buf, n); - n = snprintf(buf, BUFSIZ, "USER %s %d * :%s\r\n", nick, mode, nick); + n = snprintf(buf, BUFSIZ, "USER ~%s 0 * :%s\r\n", nick, nick); WRITE(sock, buf, n); if (pass_type == SASL_PLAIN_PASSWD) { -- 2.39.3