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
This commit is contained in:
ailin-nemui 2015-09-23 00:07:03 +02:00
commit 618a636f7c
3 changed files with 13 additions and 1 deletions

View file

@ -571,6 +571,14 @@ int nick_match_msg(CHANNEL_REC *channel, const char *msg, const char *nick)
}
}
int nick_match_msg_everywhere(CHANNEL_REC *channel, const char *msg, const char *nick)
{
g_return_val_if_fail(nick != NULL, FALSE);
g_return_val_if_fail(msg != NULL, FALSE);
return stristr_full(msg, nick) != NULL;
}
void nicklist_init(void)
{
signal_add_first("channel created", (SIGNAL_FUNC) sig_channel_created);

View file

@ -55,6 +55,7 @@ int nicklist_compare(NICK_REC *p1, NICK_REC *p2, const char *nick_prefix);
/* Check is `msg' is meant for `nick'. */
int nick_match_msg(CHANNEL_REC *channel, const char *msg, const char *nick);
int nick_match_msg_everywhere(CHANNEL_REC *channel, const char *msg, const char *nick);
void nicklist_init(void);
void nicklist_deinit(void);