Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- 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
@kaniini kaniini authored
View
2  Changes
@@ -2424,3 +2424,5 @@
reported by katsklaw, patch from warg (#4036).
- Added 'away-notify' client capability, which informs the client of any AWAY
state changes of users on the same channel. Patch from nenolod (#4097).
+- Add support for account-notify client capability (#4098). This capability
+ can be used to request passive notifications for accountname changes.
View
1  include/struct.h
@@ -371,6 +371,7 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define PROTO_STARTTLS 0x40000 /* client supports STARTTLS */
#define PROTO_SASL 0x80000 /* client is doing SASL */
#define PROTO_AWAY_NOTIFY 0x100000 /* client supports away-notify */
+#define PROTO_ACCOUNT_NOTIFY 0x200000 /* client supports account-notify */
/*
* flags macros.
View
1  src/modules/m_cap.c
@@ -72,6 +72,7 @@ struct clicap {
#define CLICAP_FLAGS_CLIACK 0x2
static struct clicap clicap_table[] = {
+ {"account-notify", PROTO_ACCOUNT_NOTIFY, CLICAP_FLAGS_NONE},
{"away-notify", PROTO_AWAY_NOTIFY, CLICAP_FLAGS_NONE},
{"multi-prefix", PROTO_NAMESX, CLICAP_FLAGS_NONE},
{"sasl", PROTO_SASL, CLICAP_FLAGS_NONE},
View
5 src/modules/m_svsmode.c
@@ -514,7 +514,12 @@ char *xtok = show_change ? TOK_SVS2MODE : TOK_SVSMODE;
goto setmodex;
case 'd':
if (parv[3])
+ {
strlcpy(acptr->user->svid, parv[3], sizeof(acptr->user->svid));
+ sendto_common_channels_local_butone(acptr, PROTO_ACCOUNT_NOTIFY, ":%s!%s@%s ACCOUNT %s",
+ acptr->name, acptr->user->username, GetHost(acptr),
+ !isdigit(*acptr->user->svid) ? acptr->user->svid : "*");
+ }
break;
case 'x':
if (what == MODE_DEL)
Please sign in to comment.
Something went wrong with that request. Please try again.