about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config/preferences.c8
-rw-r--r--src/config/preferences.h2
-rw-r--r--src/event/server_events.c6
3 files changed, 12 insertions, 4 deletions
diff --git a/src/config/preferences.c b/src/config/preferences.c
index 968787e3..ce40a321 100644
--- a/src/config/preferences.c
+++ b/src/config/preferences.c
@@ -1230,6 +1230,8 @@ _get_group(preference_t pref)
         case PREF_NOTIFY_ROOM_TEXT:
         case PREF_NOTIFY_INVITE:
         case PREF_NOTIFY_SUB:
+        case PREF_MENTION_CASE_SENSITIVE:
+        case PREF_MENTION_WHOLE_WORD:
             return PREF_GROUP_NOTIFICATIONS;
         case PREF_CHLOG:
         case PREF_GRLOG:
@@ -1332,6 +1334,10 @@ _get_key(preference_t pref)
             return "invite";
         case PREF_NOTIFY_SUB:
             return "sub";
+        case PREF_MENTION_CASE_SENSITIVE:
+            return "room.mention.casesensitive";
+        case PREF_MENTION_WHOLE_WORD:
+            return "room.mention.wholeword";
         case PREF_CHLOG:
             return "chlog";
         case PREF_GRLOG:
@@ -1488,6 +1494,8 @@ _get_default_boolean(preference_t pref)
         case PREF_ROSTER_ROOMS:
         case PREF_TLS_SHOW:
         case PREF_LASTACTIVITY:
+        case PREF_MENTION_CASE_SENSITIVE:
+        case PREF_MENTION_WHOLE_WORD:
             return TRUE;
         default:
             return FALSE;
diff --git a/src/config/preferences.h b/src/config/preferences.h
index 1ab18d31..7165079b 100644
--- a/src/config/preferences.h
+++ b/src/config/preferences.h
@@ -113,6 +113,8 @@ typedef enum {
     PREF_NOTIFY_ROOM_TEXT,
     PREF_NOTIFY_INVITE,
     PREF_NOTIFY_SUB,
+    PREF_MENTION_CASE_SENSITIVE,
+    PREF_MENTION_WHOLE_WORD,
     PREF_CHLOG,
     PREF_GRLOG,
     PREF_AUTOAWAY_CHECK,
diff --git a/src/event/server_events.c b/src/event/server_events.c
index 2712ba56..11252dab 100644
--- a/src/event/server_events.c
+++ b/src/event/server_events.c
@@ -251,10 +251,8 @@ 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 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 case_sensitive = prefs_get_boolean(PREF_MENTION_CASE_SENSITIVE);
+    gboolean whole_word = prefs_get_boolean(PREF_MENTION_WHOLE_WORD);
     gboolean mention = prof_strstr(mynick, new_message, case_sensitive, whole_word);
     GList *triggers = prefs_message_get_triggers(new_message);