1
0
mirror of https://github.com/moparisthebest/hexchat synced 2024-11-25 18:52:22 -05:00

Add account to Join event

Also reorganizes some logic. The account will usually be NULL unless
extended-join capability enabled.

Closes #934
This commit is contained in:
TingPing 2014-04-06 15:22:51 -04:00
parent 0f828dd74f
commit b41bd594b0
5 changed files with 9 additions and 4 deletions

View File

@ -778,7 +778,7 @@ inbound_join (server *serv, char *chan, char *user, char *ip, char *account,
session *sess = find_channel (serv, chan);
if (sess)
{
EMIT_SIGNAL_TIMESTAMP (XP_TE_JOIN, sess, user, chan, ip, NULL, 0,
EMIT_SIGNAL_TIMESTAMP (XP_TE_JOIN, sess, user, chan, ip, account, 0,
tags_data->timestamp);
userlist_add (sess, user, ip, account, realname, tags_data);
}

View File

@ -1042,8 +1042,12 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
{
char *chan = word[3];
char *account = word[4];
char *realname = word_eol[5] + 1;
char *realname = word_eol[5];
if (account && strcmp (account, "*") == 0)
account = NULL;
if (realname && *realname == ':')
realname++;
if (*chan == ':')
chan++;
if (!serv->p_cmp (nick, serv->nick))

View File

@ -1026,6 +1026,7 @@ static char * const pevt_join_help[] = {
N_("The nick of the joining person"),
N_("The channel being joined"),
N_("The host of the person"),
N_("The account of the person"),
};
static char * const pevt_chanaction_help[] = {

View File

@ -494,7 +494,7 @@ Join
XP_TE_JOIN
pevt_join_help
%C23*$t$1 ($3%C23) has joined
3
4
Keyword
XP_TE_KEYWORD

View File

@ -416,7 +416,7 @@ userlist_add (struct session *sess, char *name, char *hostname,
/* extended join info */
if (sess->server->have_extjoin)
{
if (account && strcmp (account, "*") != 0)
if (account && *account)
user->account = strdup (account);
if (realname && *realname)
user->realname = strdup (realname);