Added prof_strstr function
This commit is contained in:
@@ -251,15 +251,11 @@ sv_ev_room_message(const char *const room_jid, const char *const nick, const cha
|
||||
char *new_message = plugins_pre_room_message_display(room_jid, nick, message);
|
||||
char *mynick = muc_nick(mucwin->roomjid);
|
||||
|
||||
gboolean mention = FALSE;
|
||||
char *message_lower = g_utf8_strdown(new_message, -1);
|
||||
char *mynick_lower = g_utf8_strdown(mynick, -1);
|
||||
if (g_strrstr(message_lower, mynick_lower)) {
|
||||
mention = TRUE;
|
||||
}
|
||||
g_free(message_lower);
|
||||
g_free(mynick_lower);
|
||||
|
||||
// gboolean case_sensitive = prefs_get_boolean(PREF_MENTION_CASE_SENSITIVE);
|
||||
// gboolean whole_word = prefs_get_boolean(PREF_MENTION_WHOLE_WORD);
|
||||
gboolean case_sensitive = FALSE;
|
||||
gboolean whole_word = FALSE;
|
||||
gboolean mention = prof_strstr(mynick, new_message, case_sensitive, whole_word);
|
||||
GList *triggers = prefs_message_get_triggers(new_message);
|
||||
|
||||
mucwin_message(mucwin, nick, new_message, mention, triggers);
|
||||
|
||||
Reference in New Issue
Block a user