Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

- Add support for account-notify client capability (#4098). This capa…

…bility

  can be used to request passive notifications for accountname changes.
  • Loading branch information...
commit 3b8010faa4f8167d9fa73cd3f0fa7f181c0deab6 1 parent b0c8d94
William Pitcock kaniini authored
2  Changes
@@ -2424,3 +2424,5 @@
2424 2424 reported by katsklaw, patch from warg (#4036).
2425 2425 - Added 'away-notify' client capability, which informs the client of any AWAY
2426 2426 state changes of users on the same channel. Patch from nenolod (#4097).
  2427 +- Add support for account-notify client capability (#4098). This capability
  2428 + can be used to request passive notifications for accountname changes.
1  include/struct.h
@@ -371,6 +371,7 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
371 371 #define PROTO_STARTTLS 0x40000 /* client supports STARTTLS */
372 372 #define PROTO_SASL 0x80000 /* client is doing SASL */
373 373 #define PROTO_AWAY_NOTIFY 0x100000 /* client supports away-notify */
  374 +#define PROTO_ACCOUNT_NOTIFY 0x200000 /* client supports account-notify */
374 375
375 376 /*
376 377 * flags macros.
1  src/modules/m_cap.c
@@ -72,6 +72,7 @@ struct clicap {
72 72 #define CLICAP_FLAGS_CLIACK 0x2
73 73
74 74 static struct clicap clicap_table[] = {
  75 + {"account-notify", PROTO_ACCOUNT_NOTIFY, CLICAP_FLAGS_NONE},
75 76 {"away-notify", PROTO_AWAY_NOTIFY, CLICAP_FLAGS_NONE},
76 77 {"multi-prefix", PROTO_NAMESX, CLICAP_FLAGS_NONE},
77 78 {"sasl", PROTO_SASL, CLICAP_FLAGS_NONE},
5 src/modules/m_svsmode.c
@@ -514,7 +514,12 @@ char *xtok = show_change ? TOK_SVS2MODE : TOK_SVSMODE;
514 514 goto setmodex;
515 515 case 'd':
516 516 if (parv[3])
  517 + {
517 518 strlcpy(acptr->user->svid, parv[3], sizeof(acptr->user->svid));
  519 + sendto_common_channels_local_butone(acptr, PROTO_ACCOUNT_NOTIFY, ":%s!%s@%s ACCOUNT %s",
  520 + acptr->name, acptr->user->username, GetHost(acptr),
  521 + !isdigit(*acptr->user->svid) ? acptr->user->svid : "*");
  522 + }
518 523 break;
519 524 case 'x':
520 525 if (what == MODE_DEL)

0 comments on commit 3b8010f

Please sign in to comment.
Something went wrong with that request. Please try again.