Disable notify in restricted mode

catgirl shouldn't try to execute a command if it is misconfigured
with both restrict and notify.
weechat-hashes
C. McEnroe 2021-01-25 18:27:07 -05:00
parent 86b79096e0
commit bd210e0f35
2 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,4 @@
.Dd January 22, 2021 .Dd January 25, 2021
.Dt CATGIRL 1 .Dt CATGIRL 1
.Os .Os
. .
@ -163,7 +163,10 @@ Disable the
and and
.Ic /open .Ic /open
commands, commands,
as well as viewing this manual with the
.Fl N
option,
and viewing this manual with
.Ic /help . .Ic /help .
. .
.It Fl S Ar host , Cm bind = Ar host .It Fl S Ar host , Cm bind = Ar host

1
ui.c
View File

@ -533,6 +533,7 @@ windowScrollSearch(struct Window *window, const char *str, int dir) {
struct Util uiNotifyUtil; struct Util uiNotifyUtil;
static void notify(uint id, const char *str) { static void notify(uint id, const char *str) {
if (self.restricted) return;
if (!uiNotifyUtil.argc) return; if (!uiNotifyUtil.argc) return;
char buf[1024] = ""; char buf[1024] = "";