diff --git a/include/client.h b/include/client.h index 14ee9c004..61e55c03c 100644 --- a/include/client.h +++ b/include/client.h @@ -444,6 +444,7 @@ struct ListClient #define CLICAP_MULTI_PREFIX 0x0001 #define CLICAP_SASL 0x0002 #define CLICAP_ACCOUNT_NOTIFY 0x0004 +#define CLICAP_EXTENDED_JOIN 0x0008 /* * flags macros. diff --git a/modules/m_cap.c b/modules/m_cap.c index aa2693a80..0530537db 100644 --- a/modules/m_cap.c +++ b/modules/m_cap.c @@ -70,7 +70,8 @@ static struct clicap } clicap_list[] = { _CLICAP("multi-prefix", CLICAP_MULTI_PREFIX, 0, 0), _CLICAP("sasl", CLICAP_SASL, 0, 0), - _CLICAP("account-notify", CLICAP_ACCOUNT_NOTIFY, 0, 0) + _CLICAP("account-notify", CLICAP_ACCOUNT_NOTIFY, 0, 0), + _CLICAP("extended-join", CLICAP_EXTENDED_JOIN, 0, 0), }; #define CLICAP_LIST_LEN (sizeof(clicap_list) / sizeof(struct clicap)) diff --git a/src/channel.c b/src/channel.c index 92d365125..bb49f1d57 100644 --- a/src/channel.c +++ b/src/channel.c @@ -136,8 +136,13 @@ send_channel_join(struct Channel *chptr, struct Client *client_p) if (!IsClient(client_p)) return; - sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN %s", - client_p->name, client_p->username, client_p->host, chptr->chname); + sendto_channel_local_with_capability(ALL_MEMBERS, NOCAPS, CLICAP_EXTENDED_JOIN, chptr, ":%s!%s@%s JOIN %s", + client_p->name, client_p->username, client_p->host, chptr->chname); + + sendto_channel_local_with_capability(ALL_MEMBERS, CLICAP_EXTENDED_JOIN, NOCAPS, chptr, ":%s!%s@%s JOIN %s %s %ld :%s", + client_p->name, client_p->username, client_p->host, chptr->chname, + EmptyString(client_p->user->suser) ? "*" : client_p->user->suser, + client_p->tsinfo, client_p->info); } /* find_channel_membership()