summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2013-08-07 06:14:30 -0400
committerTingPing <tingping@tingping.se>2013-08-07 06:14:30 -0400
commit13bfd060b6bb74b083ed7917e03d875d90d7d339 (patch)
tree93d820d4dc30a772dea6b570d43f0cb494616b96
parent1370a49742389c205bb4b912829ae6c6747579c0 (diff)
Format Channel URLs
closes #706
-rw-r--r--src/common/proto-irc.c9
-rw-r--r--src/common/text.c5
-rw-r--r--src/common/textevents.in6
3 files changed, 20 insertions, 0 deletions
diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c
index 128c0c85..642cd056 100644
--- a/src/common/proto-irc.c
+++ b/src/common/proto-irc.c
@@ -678,6 +678,15 @@ process_numeric (session * sess, int n,
 		handle_mode (serv, word, word_eol, "", TRUE, tags_data);
 		break;
 
+	case 328: /* channel url */
+		sess = find_channel (serv, word[4]);
+		if (sess)
+		{
+			EMIT_SIGNAL_TIMESTAMP (XP_TE_CHANURL, sess, word[4], word[5] + 1,
+									NULL, NULL, 0, tags_data->timestamp); 
+		}
+		break;
+
 	case 329:
 		sess = find_channel (serv, word[4]);
 		if (sess)
diff --git a/src/common/text.c b/src/common/text.c
index b825faba..b6ad378d 100644
--- a/src/common/text.c
+++ b/src/common/text.c
@@ -1359,6 +1359,11 @@ static char * const pevt_chanmodes_help[] = {
 	N_("Modes string"),
 };
 
+static char * const pevt_chanurl_help[] = {
+	N_("Channel Name"),
+	N_("URL"),
+};
+
 static char * const pevt_rawmodes_help[] = {
 	N_("Nickname"),
 	N_("Modes string"),
diff --git a/src/common/textevents.in b/src/common/textevents.in
index 1f86d90b..934610c5 100644
--- a/src/common/textevents.in
+++ b/src/common/textevents.in
@@ -148,6 +148,12 @@ pevt_chanop_help
 %C22*%O$t%C26$1%O gives channel operator status to %C18$2%O
 2
 
+Channel Url
+XP_TE_CHANURL
+pevt_chanurl_help
+%C22*%O$tChannel %C22$1%O url: %C24$2
+2
+
 Channel Quiet
 XP_TE_CHANQUIET
 pevt_chanquiet_help