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.
This commit is contained in:
Diogo Sousa
2013-06-22 16:55:41 +01:00
parent a01bd83c64
commit 42da8fe3ef
5 changed files with 33 additions and 22 deletions

View File

@@ -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);
}
}