1
0
mirror of https://github.com/moparisthebest/hexchat synced 2024-12-01 13:42:16 -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); session *sess = find_channel (serv, chan);
if (sess) 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); tags_data->timestamp);
userlist_add (sess, user, ip, account, realname, tags_data); 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 *chan = word[3];
char *account = word[4]; 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 == ':') if (*chan == ':')
chan++; chan++;
if (!serv->p_cmp (nick, serv->nick)) 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 nick of the joining person"),
N_("The channel being joined"), N_("The channel being joined"),
N_("The host of the person"), N_("The host of the person"),
N_("The account of the person"),
}; };
static char * const pevt_chanaction_help[] = { static char * const pevt_chanaction_help[] = {

View File

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

View File

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