summaryrefslogtreecommitdiff
path: root/src/core/nicklist.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/nicklist.c')
-rw-r--r--src/core/nicklist.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/core/nicklist.c b/src/core/nicklist.c
index a5f25f34..770b0afc 100644
--- a/src/core/nicklist.c
+++ b/src/core/nicklist.c
@@ -342,7 +342,7 @@ GSList *nicklist_get_same_unique(SERVER_REC *server, void *id)
return rec.list;
}
-/* nick record comparision for sort functions */
+/* nick record comparison for sort functions */
int nicklist_compare(NICK_REC *p1, NICK_REC *p2, const char *nick_prefix)
{
int i;
@@ -478,7 +478,7 @@ static NICK_REC *nick_nfind(CHANNEL_REC *channel, const char *nick, int len)
if (rec != NULL) {
/* if there's multiple, get the one with identical case */
while (rec->next != NULL) {
- if (strcmp(rec->nick, tmpnick) == 0)
+ if (g_strcmp0(rec->nick, tmpnick) == 0)
break;
rec = rec->next;
}
@@ -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);