summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/inbound.c9
-rw-r--r--src/common/text.c5
-rw-r--r--src/common/textevents.in12
3 files changed, 26 insertions, 0 deletions
diff --git a/src/common/inbound.c b/src/common/inbound.c
index 58a458b0..29eaf754 100644
--- a/src/common/inbound.c
+++ b/src/common/inbound.c
@@ -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;
 	}
 }
diff --git a/src/common/text.c b/src/common/text.c
index a7cfa5b7..04328a69 100644
--- a/src/common/text.c
+++ b/src/common/text.c
@@ -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"),
 };
diff --git a/src/common/textevents.in b/src/common/textevents.in
index 5e9ee55a..2c12cf01 100644
--- a/src/common/textevents.in
+++ b/src/common/textevents.in
@@ -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