Add slashguard feature

New command `/slashguard` tries to protect against typing ` /quit` by
not allowing a slash in the first 4 characters.
This commit is contained in:
Michael Vetter
2020-03-18 18:20:05 +01:00
parent ed97e3730a
commit 3c56b289ed
10 changed files with 54 additions and 1 deletions

View File

@@ -8836,3 +8836,15 @@ cmd_correct(ProfWin *window, const char *const command, gchar **args)
win_println(window, THEME_DEFAULT, "!", "Command /correct only valid in regular chat windows.");
return TRUE;
}
gboolean
cmd_slashguard(ProfWin *window, const char *const command, gchar **args)
{
if (args[0] == NULL) {
return FALSE;
}
_cmd_set_boolean_preference(args[0], command, "Slashguard", PREF_SLASH_GUARD);
return TRUE;
}