mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 12:23:37 +02:00
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:
parent
3ac451c608
commit
15eaa7cc88
3 changed files with 22 additions and 7 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue