if (!sess)
sess = serv->server_session;
- tim[24] = 0; /* get rid of the \n */
+ if (tim != NULL)
+ tim[24] = 0; /* get rid of the \n */
+
EMIT_SIGNAL_TIMESTAMP (XP_TE_TOPICDATE, sess, chan, nick, tim, NULL, 0,
tags_data->timestamp);
}
server *serv = sess->server;
char *nl;
- if (stamp <= 0)
+ if (stamp <= 0 || time_str == NULL)
{
time_str = "";
}
{
time_t timestamp = (time_t) atol (timestr);
char *tim = ctime (×tamp);
- tim[24] = 0; /* get rid of the \n */
+ if (tim != NULL)
+ tim[24] = 0; /* get rid of the \n */
EMIT_SIGNAL_TIMESTAMP (XP_TE_CHANDATE, sess, chan, tim, NULL, NULL, 0,
tags_data->timestamp);
}
else
{
tim = ctime (×tamp);
- tim[19] = 0; /* get rid of the \n */
+ if (tim != NULL)
+ tim[19] = 0; /* get rid of the \n */
EMIT_SIGNAL_TIMESTAMP (XP_TE_WHOIS4T, whois_sess, word[4],
outbuf, tim, NULL, 0, tags_data->timestamp);
}