summary refs log tree commit diff stats
path: root/src/common/ctcp.c
diff options
context:
space:
mode:
authorDiogo Sousa <diogogsousa@gmail.com>2013-06-22 16:55:41 +0100
committerDiogo Sousa <diogogsousa@gmail.com>2013-06-28 16:04:16 +0100
commit42da8fe3efb3d6bb7e3fb14169e7cc362e21921a (patch)
tree5d2055d9964964cd1e2317e0883b7e8657aade26 /src/common/ctcp.c
parenta01bd83c64b76da028d3c23b743a61bbbc62a2d2 (diff)
server-time supported in all named servermsg: ping, error, notice and
authenticate.

The only thing left to do for server-time are the numeric messages.
Diffstat (limited to 'src/common/ctcp.c')
-rw-r--r--src/common/ctcp.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/common/ctcp.c b/src/common/ctcp.c
index ebfb604d..7045c08a 100644
--- a/src/common/ctcp.c
+++ b/src/common/ctcp.c
@@ -85,7 +85,8 @@ ctcp_check (session *sess, char *nick, char *word[], char *word_eol[],
 
 void
 ctcp_handle (session *sess, char *to, char *nick, char *ip,
-				 char *msg, char *word[], char *word_eol[], int id)
+				 char *msg, char *word[], char *word_eol[], int id,
+				 const message_tags_data *tags_data)
 {
 	char *po;
 	session *chansess;
@@ -161,12 +162,13 @@ ctcp_handle (session *sess, char *to, char *nick, char *ip,
 				if (!chansess)
 					chansess = sess;
 
-				EMIT_SIGNAL (XP_TE_CTCPSNDC, chansess, word[5],
-								 nick, to, NULL, 0);
+				EMIT_SIGNAL_TIMESTAMP (XP_TE_CTCPSNDC, chansess, word[5],
+											  nick, to, NULL, 0, tags_data->timestamp);
 			} else
 			{
-				EMIT_SIGNAL (XP_TE_CTCPSND, sess->server->front_session, word[5],
-								 nick, NULL, NULL, 0);
+				EMIT_SIGNAL_TIMESTAMP (XP_TE_CTCPSND, sess->server->front_session,
+											  word[5], nick, NULL, NULL, 0,
+											  tags_data->timestamp);
 			}
 
 			/* don't let IRCers specify path */
@@ -187,13 +189,14 @@ generic:
 
 	if (!is_channel (sess->server, to))
 	{
-		EMIT_SIGNAL (XP_TE_CTCPGEN, sess->server->front_session, msg, nick,
-						 NULL, NULL, 0);
+		EMIT_SIGNAL_TIMESTAMP (XP_TE_CTCPGEN, sess->server->front_session, msg,
+									  nick, NULL, NULL, 0, tags_data->timestamp);
 	} else
 	{
 		chansess = find_channel (sess->server, to);
 		if (!chansess)
 			chansess = sess;
-		EMIT_SIGNAL (XP_TE_CTCPGENC, chansess, msg, nick, to, NULL, 0);
+		EMIT_SIGNAL_TIMESTAMP (XP_TE_CTCPGENC, chansess, msg, nick, to, NULL, 0,
+									  tags_data->timestamp);
 	}
 }