diff options
author | Marius Halden <marius.h@lden.org> | 2016-03-21 14:30:44 +0100 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2016-05-07 14:27:54 +0200 |
commit | dab92571b0959a1f1c4805dd6d874421b262aa8c (patch) | |
tree | afd8181cd53df4b2eb64d59094a9be92044b305c /irc.c | |
parent | a21ce7901fd2d4f81cddcd7f5d30346d28dfc316 (diff) |
Add authmode sasl
New AuthMode sasl added, when this is used all users have to
authenticate with sasl.
Diffstat (limited to 'irc.c')
-rw-r--r-- | irc.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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; |