From dab92571b0959a1f1c4805dd6d874421b262aa8c Mon Sep 17 00:00:00 2001 From: Marius Halden Date: Mon, 21 Mar 2016 14:30:44 +0100 Subject: Add authmode sasl New AuthMode sasl added, when this is used all users have to authenticate with sasl. --- irc.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'irc.c') diff --git a/irc.c b/irc.c index 563d3fca..d0685887 100644 --- a/irc.c +++ b/irc.c @@ -751,6 +751,11 @@ int irc_check_login(irc_t *irc) if (global.conf->authmode == AUTHMODE_CLOSED && !(irc->status & USTATUS_AUTHORIZED)) { irc_send_num(irc, 464, ":This server is password-protected."); return 0; + } else if (global.conf->authmode == AUTHMODE_SASL && + (!(irc->caps & CAP_SASL) || + !(irc->status & USTATUS_SASL_AUTHENTICATED))) { + irc_send_num(irc, 464, ":This server requires sasl."); + return 0; } else { irc_channel_t *ic; irc_user_t *iu = irc->user; -- cgit v1.2.3