1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-01 04:14:16 -04:00

Merge pull request #1091 from ailin-nemui/cap302

enable irc cap ls 302
This commit is contained in:
ailin-nemui 2019-08-13 18:07:17 +02:00 committed by GitHub
commit 3ea22fb535
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -236,11 +236,11 @@ static void server_init(IRC_SERVER_REC *server)
}
if (conn->sasl_mechanism != SASL_MECHANISM_NONE)
irc_cap_toggle(server, "sasl", TRUE);
irc_cap_toggle(server, CAP_SASL, TRUE);
irc_cap_toggle(server, "multi-prefix", TRUE);
irc_cap_toggle(server, CAP_MULTI_PREFIX, TRUE);
irc_send_cmd_now(server, "CAP LS");
irc_send_cmd_now(server, "CAP LS " CAP_LS_VERSION);
if (conn->password != NULL && *conn->password != '\0') {
/* send password */

View File

@ -5,6 +5,10 @@
#include <irssi/src/core/servers.h>
#include <irssi/src/irc/core/modes.h>
#define CAP_LS_VERSION "302"
#define CAP_SASL "sasl"
#define CAP_MULTI_PREFIX "multi-prefix"
/* returns IRC_SERVER_REC if it's IRC server, NULL if it isn't */
#define IRC_SERVER(server) \
PROTO_CHECK_CAST(SERVER(server), IRC_SERVER_REC, chat_type, "IRC")