Added snotes for failed SASL authentication attempts if need_sasl flag is set

Many thanks to Shockk for this patch.

References commits:
 - 15dc12b76e76c6fa2ead773b6b40965223ad453f - Added snotes for failed SASL authentication attempts if need_sasl flag is set.
 - febd2e2aca27f7f1acfc522f3fda65d8be067edc - Updated help/opers/snomask to add +S snomask.
This commit is contained in:
Sam Dodrill 2013-09-15 21:33:10 -07:00
parent 9e58efb6bc
commit 2681b86df2
4 changed files with 5 additions and 1 deletions

View File

@ -16,6 +16,7 @@ Server notice masks: (? designates that the snomask is provided
+n - Local client nick changes
+r - Invalid usernames and dumb HTTP proxies
+s - Generic server messages and oper kills
+S - Clients refused due to failed SASL auth
+u - Client connections without auth{} block
? +W - Shows whenever someone does a local whois on you
+x - New server introduction and split messages

View File

@ -54,6 +54,7 @@
#define SNO_EXTERNAL 0x00000400
#define SNO_SPY 0x00000800
#define SNO_OPERSPY 0x00001000
#define SNO_SASLFAIL 0x00002000
char *construct_snobuf(unsigned int val);
unsigned int parse_snobuf_to_mask(unsigned int val, const char *sno);

View File

@ -355,6 +355,8 @@ register_local_user(struct Client *client_p, struct Client *source_p, const char
if(IsNeedSasl(aconf) && !*user->suser)
{
sendto_realops_snomask(SNO_SASLFAIL, L_ALL,
"SASL authentication failed, rejecting %s[%s].", source_p->name, source_p->host);
ServerStats.is_ref++;
sendto_one_notice(source_p, ":*** Notice -- You need to identify via SASL to use this server");
exit_client(client_p, source_p, &me, "SASL access only");

View File

@ -62,7 +62,7 @@ int snomask_modes[256] = {
0, /* P */
0, /* Q */
0, /* R */
0, /* S */
SNO_SASLFAIL, /* S */
0, /* T */
0, /* U */
0, /* V */