Prevent entering commands in <debug> if restricted

Because the <debug> ID always exists, it's possible to create a window
for it even while restricted with "/window <debug>" and try to enter
commands there.
weechat-hashes
C. McEnroe 2020-03-02 19:17:42 -05:00
parent 8570a62235
commit 5c167e4181
1 changed files with 1 additions and 1 deletions

View File

@ -392,7 +392,7 @@ const char *commandIsAction(uint id, const char *input) {
} }
void command(uint id, char *input) { void command(uint id, char *input) {
if (id == Debug && input[0] != '/') { if (id == Debug && input[0] != '/' && !self.restricted) {
commandQuote(id, input); commandQuote(id, input);
return; return;
} else if (commandIsPrivmsg(id, input)) { } else if (commandIsPrivmsg(id, input)) {