about summary refs log tree commit diff
path: root/command.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-03-02 19:17:42 -0500
committerJune McEnroe <june@causal.agency>2020-03-02 19:18:55 -0500
commit5c167e418163da9eef2fac6433b554e660c0de24 (patch)
treec9a12e0f337a41242e8bd630b22126c8abdbd0d7 /command.c
parentImplement the causal.agency/consumer capability (diff)
downloadtest-5c167e418163da9eef2fac6433b554e660c0de24.tar.gz
test-5c167e418163da9eef2fac6433b554e660c0de24.zip
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.
Diffstat (limited to 'command.c')
-rw-r--r--command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/command.c b/command.c
index c2ebab7..701486b 100644
--- a/command.c
+++ b/command.c
@@ -392,7 +392,7 @@ const char *commandIsAction(uint id, const char *input) {
 }
 
 void command(uint id, char *input) {
-	if (id == Debug && input[0] != '/') {
+	if (id == Debug && input[0] != '/' && !self.restricted) {
 		commandQuote(id, input);
 		return;
 	} else if (commandIsPrivmsg(id, input)) {
CHGHOST for incapable clientsJune McEnroe 2019-11-10Rename listen to localJune McEnroe 2019-11-09Remove extended-join and invite-notifyJune McEnroe 2019-11-09Maintain stateCaps and offer them to clientsJune McEnroe 2019-11-09Parse capabilitiesJune McEnroe 2019-11-09Avoid the reserved _A names with BIT macroJune McEnroe 2019-11-09Define macro for bit flag enumsJune McEnroe 2019-11-08Check that password is hashedJune McEnroe 2019-11-08Avoid calling getopt_long again after it returns -1June McEnroe 2019-11-08Only change AWAY status for registered clientsJune McEnroe 2019-11-07Just write the example normallyJune McEnroe 2019-11-07Include path in readlinkat errorJune McEnroe 2019-11-07Call clientConsume before clientRecvJune McEnroe 2019-11-06Use -l:filename in Linux.mkJune McEnroe 2019-11-06Fix compat.h for #defined strlcpyJune McEnroe 2019-11-06Allow unsetting LIBRESSL_PREFIXJune McEnroe 2019-11-06Document calico service configurationJune McEnroe 2019-11-06Document SASL EXTERNAL configuration in more detailJune McEnroe 2019-11-06Document pounce service configurationJune McEnroe 2019-11-06Mention Darwin and GNU/Linux in READMEJune McEnroe 2019-11-06Assume LibreSSL from brew on DarwinJune McEnroe 2019-11-06Remove -DNO_EXPLICIT_BZERO from Darwin.mkJune McEnroe 2019-11-06Don't install rc scripts or dirs on LinuxJune McEnroe