Add extended-join client capability.

The extended-join client capability extends the JOIN message with information clients typically
query using WHO including accountname, signon TS and realname.
This commit is contained in:
William Pitcock 2010-12-16 00:24:54 -06:00
parent 99cca61ed6
commit 92052a5c24
3 changed files with 10 additions and 3 deletions

View file

@ -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.

View file

@ -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))

View file

@ -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()