diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c index 7057c02a..118f7242 100644 --- a/src/irc/core/irc-servers.c +++ b/src/irc/core/irc-servers.c @@ -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 */ diff --git a/src/irc/core/irc-servers.h b/src/irc/core/irc-servers.h index 57b65527..df0446cb 100644 --- a/src/irc/core/irc-servers.h +++ b/src/irc/core/irc-servers.h @@ -5,6 +5,10 @@ #include #include +#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")