SASL support

The only supported methods are PLAIN and EXTERNAL, the latter is untested as of
now.
The code gets the values from the keys named sasl_{mechanism,username,password}
specified for each chatnet.
This commit is contained in:
LemonBoy 2015-09-10 01:02:44 +02:00
commit b8d3301d34
10 changed files with 200 additions and 5 deletions

View file

@ -33,6 +33,7 @@
#include "irc-servers-setup.h"
#include "irc-servers.h"
#include "irc-cap.h"
#include "sasl.h"
#include "channel-rejoin.h"
#include "servers-idle.h"
#include "servers-reconnect.h"
@ -215,6 +216,9 @@ static void server_init(IRC_SERVER_REC *server)
g_free(cmd);
}
if (conn->sasl_mechanism != SASL_MECHANISM_NONE)
cap_toggle(server, "sasl", TRUE);
irc_send_cmd_now(server, "CAP LS");
if (conn->password != NULL && *conn->password != '\0') {