mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-19 16:46:21 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user