diff options
author | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2015-09-23 00:07:03 +0200 |
---|---|---|
committer | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2015-09-23 00:07:03 +0200 |
commit | 618a636f7ca2a7b915bedc1cba2860e2b948a2a2 (patch) | |
tree | 850cc2785893c7960b9aa17f64f357aa75312a8e /src/fe-common/core | |
parent | f32620673ed26e9e4e730b021b46dc1a4e6cb720 (diff) | |
parent | 3f2eaf1d3a67eddd42dd88eccb39402d45297fcb (diff) | |
download | irssi-618a636f7ca2a7b915bedc1cba2860e2b948a2a2.zip |
Merge pull request #297 from vague666/hilight_nick_matches
Add new setting to modify behaviour of hilight_nick_matches to match anywhere in message
Fixes #56
Diffstat (limited to 'src/fe-common/core')
-rw-r--r-- | src/fe-common/core/fe-messages.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fe-common/core/fe-messages.c b/src/fe-common/core/fe-messages.c index 3bd2b666..d09c1b0b 100644 --- a/src/fe-common/core/fe-messages.c +++ b/src/fe-common/core/fe-messages.c @@ -183,7 +183,9 @@ static void sig_message_public(SERVER_REC *server, const char *msg, nickrec = nicklist_find(chanrec, nick); for_me = !settings_get_bool("hilight_nick_matches") ? FALSE : - nick_match_msg(chanrec, msg, server->nick); + !settings_get_bool("hilight_nick_matches_everywhere") ? + nick_match_msg(chanrec, msg, server->nick) : + nick_match_msg_everywhere(chanrec, msg, server->nick); hilight = for_me ? NULL : hilight_match_nick(server, target, nick, address, MSGLEVEL_PUBLIC, msg); color = (hilight == NULL) ? NULL : hilight_get_color(hilight); @@ -694,6 +696,7 @@ void fe_messages_init(void) (GCompareFunc) g_direct_equal); settings_add_bool("lookandfeel", "hilight_nick_matches", TRUE); + settings_add_bool("lookandfeel", "hilight_nick_matches_everywhere", FALSE); settings_add_bool("lookandfeel", "emphasis", TRUE); settings_add_bool("lookandfeel", "emphasis_replace", FALSE); settings_add_bool("lookandfeel", "emphasis_multiword", FALSE); |