mirror of
https://github.com/irssi/irssi.git
synced 2026-08-11 04:43:34 +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
|
|
@ -314,7 +314,7 @@ static void cmd_ver(gchar *data, IRC_SERVER_REC *server, WI_ITEM_REC *item)
|
|||
static void cmd_topic(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
|
||||
{
|
||||
CHANNEL_REC *channel;
|
||||
char *timestr;
|
||||
char *timestr, *bynick, *byhost;
|
||||
|
||||
g_return_if_fail(data != NULL);
|
||||
|
||||
|
|
@ -326,10 +326,21 @@ static void cmd_topic(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
|
|||
channel->name, channel->topic);
|
||||
|
||||
if (channel->topic_time > 0) {
|
||||
byhost = strchr(channel->topic_by, '!');
|
||||
if (byhost == NULL) {
|
||||
bynick = g_strdup(channel->topic_by);
|
||||
byhost = "";
|
||||
} else {
|
||||
bynick = g_strndup(channel->topic_by,
|
||||
(int) (byhost-channel->topic_by));
|
||||
byhost++;
|
||||
}
|
||||
|
||||
timestr = my_asctime(channel->topic_time);
|
||||
printformat(server, channel->name, MSGLEVEL_CRAP,
|
||||
IRCTXT_TOPIC_INFO, channel->topic_by, timestr);
|
||||
IRCTXT_TOPIC_INFO, bynick, timestr, byhost);
|
||||
g_free(timestr);
|
||||
g_free(bynick);
|
||||
}
|
||||
signal_stop();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue