summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorBerke Viktor <bviktor@hexchat.org>2012-11-03 19:04:47 +0100
committerBerke Viktor <bviktor@hexchat.org>2012-11-03 19:04:47 +0100
commit1ac033e42aad0433ce54058273e98eb229bfa005 (patch)
tree10d6b435521f48d58a929e0ff621f85f00666bdb /src
parent76f43ce583177c6d35948c18493cee9978f075b3 (diff)
Text event for identd
Diffstat (limited to 'src')
-rw-r--r--src/common/identd.c7
-rw-r--r--src/common/text.c5
-rw-r--r--src/common/textevents.in6
3 files changed, 13 insertions, 5 deletions
diff --git a/src/common/identd.c b/src/common/identd.c
index e6fe8cb3..4ffaf23b 100644
--- a/src/common/identd.c
+++ b/src/common/identd.c
@@ -58,9 +58,7 @@ identd (char *username)
 
 	identd_is_running = FALSE;
 
-	snprintf (outbuf, sizeof (outbuf), "%%\tServicing ident request from %s as %s\n",
-				 inet_ntoa (addr.sin_addr), username);
-	PrintText (current_sess, outbuf);
+	EMIT_SIGNAL (XP_TE_IDENTD, current_sess, inet_ntoa (addr.sin_addr), username, NULL, NULL, 0);
 
 	recv (read_sok, buf, sizeof (buf) - 1, 0);
 	buf[sizeof (buf) - 1] = 0;	  /* ensure null termination */
@@ -143,8 +141,7 @@ identd_ipv6 (char *username)
 		snprintf (ipv6buf, sizeof (ipv6buf) - 1, "[SOCKET ERROR: 0x%X]", WSAGetLastError ());
 	}
 
-	snprintf (outbuf, sizeof (outbuf), "%%\tServicing ident request from %s as %s\n", ipv6buf, username);
-	PrintText (current_sess, outbuf);
+	EMIT_SIGNAL (XP_TE_IDENTD, current_sess, ipv6buf, username, NULL, NULL, 0);
 
 	recv (read_sok, buf, sizeof (buf) - 1, 0);
 	buf[sizeof (buf) - 1] = 0;	  /* ensure null termination */
diff --git a/src/common/text.c b/src/common/text.c
index 6c472690..63e4717f 100644
--- a/src/common/text.c
+++ b/src/common/text.c
@@ -1143,6 +1143,11 @@ static char * const pevt_genmsg_help[] = {
 	N_("Right message"),
 };
 
+static char * const pevt_identd_help[] = {
+	N_("IP address"),
+	N_("Username")
+};
+
 static char * const pevt_join_help[] = {
 	N_("The nick of the joining person"),
 	N_("The channel being joined"),
diff --git a/src/common/textevents.in b/src/common/textevents.in
index 0f574de1..765a3754 100644
--- a/src/common/textevents.in
+++ b/src/common/textevents.in
@@ -424,6 +424,12 @@ pevt_genmsg_help
 $1$t$2
 n2
 
+Identd
+XP_TE_IDENTD
+pevt_identd_help
+%C23*%O$tServicing ident request from %C23$1%O as %C18$2%O
+2
+
 Ignore Add
 XP_TE_IGNOREADD
 pevt_ignoreaddremove_help