summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorJari Matilainen <jari.matilainen@gmail.com>2015-09-22 22:39:44 +0200
committerJari Matilainen <jari.matilainen@gmail.com>2015-09-22 22:49:50 +0200
commit5a4be0f4f5f36787e98215d87b88a50a5f7e7e01 (patch)
tree99f65e52d1947c71e4a38c6a1c18d39df28ec0e2 /src/core
parent2d69deb0a36516bac9514c6d53a1389b0a4b031a (diff)
downloadirssi-5a4be0f4f5f36787e98215d87b88a50a5f7e7e01.zip
Add new setting to optionally modify behaviour of hilight_nick_matches
Fix indentation Remove unused variables that crept into the nick_match_msg_everywhere function
Diffstat (limited to 'src/core')
-rw-r--r--src/core/nicklist.c9
-rw-r--r--src/core/nicklist.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/core/nicklist.c b/src/core/nicklist.c
index a96b8a9e..c88f5d6d 100644
--- a/src/core/nicklist.c
+++ b/src/core/nicklist.c
@@ -21,6 +21,7 @@
#include "module.h"
#include "signals.h"
#include "misc.h"
+#include "settings.h"
#include "servers.h"
#include "channels.h"
@@ -571,6 +572,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);
+}
+
void nicklist_init(void)
{
signal_add_first("channel created", (SIGNAL_FUNC) sig_channel_created);
diff --git a/src/core/nicklist.h b/src/core/nicklist.h
index 55dfd5ef..5e0f4f75 100644
--- a/src/core/nicklist.h
+++ b/src/core/nicklist.h
@@ -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);