1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Let slashguard ignore quoted messages

This let's us whole `/me` messages and other messages starting with `>`.

Fix https://github.com/profanity-im/profanity/issues/1732
This commit is contained in:
Michael Vetter 2022-07-04 09:15:03 +02:00
parent 4818b02391
commit 9ef3491228

View File

@ -200,7 +200,8 @@ inp_readline(void)
if (inp_line) {
if (!get_password && prefs_get_boolean(PREF_SLASH_GUARD)) {
if (strlen(inp_line) > 1) {
// ignore quoted messages
if (strlen(inp_line) > 1 && inp_line[0] != '>') {
char* res = (char*)memchr(inp_line + 1, '/', 3);
if (res) {
cons_show("Your text contains a slash in the first 4 characters");