diff --git a/include/client.h b/include/client.h index 4a28a3079..14ee9c004 100644 --- a/include/client.h +++ b/include/client.h @@ -443,6 +443,7 @@ struct ListClient #define CLICAP_MULTI_PREFIX 0x0001 #define CLICAP_SASL 0x0002 +#define CLICAP_ACCOUNT_NOTIFY 0x0004 /* * flags macros. diff --git a/modules/m_cap.c b/modules/m_cap.c index 6e06ef73c..aa2693a80 100644 --- a/modules/m_cap.c +++ b/modules/m_cap.c @@ -69,7 +69,8 @@ static struct clicap int namelen; } clicap_list[] = { _CLICAP("multi-prefix", CLICAP_MULTI_PREFIX, 0, 0), - _CLICAP("sasl", CLICAP_SASL, 0, 0) + _CLICAP("sasl", CLICAP_SASL, 0, 0), + _CLICAP("account-notify", CLICAP_ACCOUNT_NOTIFY, 0, 0) }; #define CLICAP_LIST_LEN (sizeof(clicap_list) / sizeof(struct clicap)) diff --git a/modules/m_services.c b/modules/m_services.c index 03436edba..e3545d5b1 100644 --- a/modules/m_services.c +++ b/modules/m_services.c @@ -107,6 +107,10 @@ me_su(struct Client *client_p, struct Client *source_p, else rb_strlcpy(target_p->user->suser, parv[2], sizeof(target_p->user->suser)); + sendto_common_channels_local_butone(target_p, CLICAP_ACCOUNT_NOTIFY, ":%s!%s@%s ACCOUNT :%s", + target_p->name, target_p->username, target_p->host, + EmptyString(target_p->user->suser) ? "*" : target_p->user->suser); + invalidate_bancache_user(target_p); return 0;