Split nick and host for topic info format.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2782 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-05-12 15:18:10 +00:00 committed by cras
commit 15eaa7cc88
3 changed files with 22 additions and 7 deletions

View file

@ -222,17 +222,21 @@ static void event_topic_get(IRC_SERVER_REC *server, const char *data)
static void event_topic_info(IRC_SERVER_REC *server, const char *data)
{
char *params, *timestr, *channel, *topicby, *topictime;
char *params, *timestr, *channel, *bynick, *byhost, *topictime;
g_return_if_fail(data != NULL);
params = event_get_params(data, 4, NULL, &channel,
&topicby, &topictime);
&bynick, &topictime);
timestr = my_asctime((time_t) atol(topictime));
printformat(server, channel, MSGLEVEL_CRAP,
IRCTXT_TOPIC_INFO, topicby, timestr);
byhost = strchr(bynick, '!');
if (byhost != NULL)
*byhost++ = '\0';
printformat(server, channel, MSGLEVEL_CRAP, IRCTXT_TOPIC_INFO,
bynick, timestr, byhost == NULL ? "" : byhost);
g_free(timestr);
g_free(params);
}