diff options
author | Michael Vetter <jubalh@iodoru.org> | 2020-03-18 18:20:05 +0100 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2020-03-18 18:20:05 +0100 |
commit | 3c56b289ed04f8525affd532d0192d653e1dcd95 (patch) | |
tree | afb0b55eea620a1d8f4968a67756f88a00c3b25d /src/config | |
parent | ed97e3730a846dd17d6350cbe6cce25e419f83e4 (diff) | |
download | profani-tty-3c56b289ed04f8525affd532d0192d653e1dcd95.tar.gz |
Add slashguard feature
New command `/slashguard` tries to protect against typing ` /quit` by not allowing a slash in the first 4 characters.
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/preferences.c | 3 | ||||
-rw-r--r-- | src/config/preferences.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/config/preferences.c b/src/config/preferences.c index a4e5700b..fe9c185b 100644 --- a/src/config/preferences.c +++ b/src/config/preferences.c @@ -1744,6 +1744,7 @@ _get_group(preference_t pref) case PREF_STATUSBAR_ROOM: case PREF_TITLEBAR_MUC_TITLE: case PREF_HISTORY_COLOR_MUC: + case PREF_SLASH_GUARD: return PREF_GROUP_UI; case PREF_STATES: case PREF_OUTTYPE: @@ -2051,6 +2052,8 @@ _get_key(preference_t pref) return "history.muc.color"; case PREF_AVATAR_CMD: return "avatar.cmd"; + case PREF_SLASH_GUARD: + return "slashguard"; default: return NULL; } diff --git a/src/config/preferences.h b/src/config/preferences.h index 37040214..8703043c 100644 --- a/src/config/preferences.h +++ b/src/config/preferences.h @@ -167,6 +167,7 @@ typedef enum { PREF_CORRECTION_ALLOW, PREF_HISTORY_COLOR_MUC, PREF_AVATAR_CMD, + PREF_SLASH_GUARD, } preference_t; typedef struct prof_alias_t { |