Skip to content

Commit

Permalink
Merge branch 'fix-gl-20' into 'security'
Browse files Browse the repository at this point in the history
do not record topic change time when sender is blank

See merge request irssi/irssi!25
  • Loading branch information
ailin-nemui committed Jan 4, 2018
2 parents f5c3995 + 54d4536 commit 7bed781
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/irc/core/channel-events.c
Expand Up @@ -138,7 +138,13 @@ static void channel_change_topic(IRC_SERVER_REC *server, const char *channel,
g_free_not_null(chanrec->topic_by);
chanrec->topic_by = g_strdup(setby);

chanrec->topic_time = settime;
if (chanrec->topic_by == NULL) {
/* ensure invariant topic_time > 0 <=> topic_by != NULL.
this could be triggered by a topic command without sender */
chanrec->topic_time = 0;
} else {
chanrec->topic_time = settime;
}

signal_emit("channel topic changed", 1, chanrec);
}
Expand Down

0 comments on commit 7bed781

Please sign in to comment.