diff --git a/src/fe-common/core/hilight-text.c b/src/fe-common/core/hilight-text.c index b74059d1..1b159a49 100644 --- a/src/fe-common/core/hilight-text.c +++ b/src/fe-common/core/hilight-text.c @@ -137,6 +137,12 @@ static HILIGHT_REC *hilight_find(const char *text, char **channels) } static void sig_print_text(TEXT_DEST_REC *dest, const char *str) +{ + if (hilight_next) + signal_stop(); +} + +static void sig_print_text_finished(TEXT_DEST_REC *dest, const char *str) { if (hilight_next) { hilight_next = FALSE; @@ -481,6 +487,7 @@ void hilight_text_init(void) settings_add_bool("misc", "hilight_only_nick", TRUE); signal_add_first("print text", (SIGNAL_FUNC) sig_print_text); + signal_add_first("print text finished", (SIGNAL_FUNC) sig_print_text_finished); signal_add_first("print text stripped", (SIGNAL_FUNC) sig_print_text_stripped); signal_add("setup reread", (SIGNAL_FUNC) read_hilight_config); signal_add_last("message public", (SIGNAL_FUNC) sig_message); @@ -496,6 +503,7 @@ void hilight_text_deinit(void) hilights_destroy_all(); signal_remove("print text", (SIGNAL_FUNC) sig_print_text); + signal_remove("print text finished", (SIGNAL_FUNC) sig_print_text_finished); signal_remove("print text stripped", (SIGNAL_FUNC) sig_print_text_stripped); signal_remove("setup reread", (SIGNAL_FUNC) read_hilight_config); signal_remove("message public", (SIGNAL_FUNC) sig_message); diff --git a/src/fe-common/core/printtext.c b/src/fe-common/core/printtext.c index d01508e7..3844174a 100644 --- a/src/fe-common/core/printtext.c +++ b/src/fe-common/core/printtext.c @@ -273,7 +273,7 @@ static void sig_print_text(TEXT_DEST_REC *dest, const char *text) it would be written to log files too */ tmp = format_get_line_start(current_theme, dest); str = format_add_linestart(text, tmp); - g_free(tmp); + g_free_not_null(tmp); format_send_to_gui(dest, str); g_free(str);