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

Notify away status of friends

This commit is contained in:
TingPing 2013-04-07 20:41:29 -04:00
parent 92654bdd9b
commit ed27009285
3 changed files with 26 additions and 0 deletions

View File

@ -1021,7 +1021,16 @@ inbound_away_notify (server *serv, char *nick, char *reason)
{
sess = list->data;
if (sess->server == serv)
{
userlist_set_away (sess, nick, reason ? TRUE : FALSE);
if (sess == serv->front_session && notify_is_in_list (serv, nick))
{
if (reason)
EMIT_SIGNAL (XP_TE_NOTIFYAWAY, sess, nick, reason, NULL, NULL, 0);
else
EMIT_SIGNAL (XP_TE_NOTIFYBACK, sess, nick, NULL, NULL, NULL, 0);
}
}
list = list->next;
}
}

View File

@ -1436,6 +1436,11 @@ static char * const pevt_dccgenericoffer_help[] = {
N_("Nickname"),
};
static char * const pevt_notifyaway_help[] = {
N_("Nickname"),
N_("Away Reason"),
};
static char * const pevt_notifynumber_help[] = {
N_("Number of notify items"),
};

View File

@ -562,6 +562,18 @@ pevt_ctcpsend_help
%O->%C18$1%O<-$t$2
n2
Notify Away
XP_TE_NOTIFYAWAY
pevt_notifyaway_help
%C23*%O$tNotify: %C18$1%C is away (%C24$2%O)
2
Notify Back
XP_TE_NOTIFYBACK
pevt_generic_nick_help
%C23*%O$tNotify: %C18$1%C is back
1
Notify Empty
XP_TE_NOTIFYEMPTY
pevt_generic_none_help