From bcafe51378b1b16a9a9429d9ad074d5a5d700144 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 17 Apr 2023 17:58:35 +0000 Subject: [PATCH] Make the check if printing is allowed the same as writing which is less confusing. --- file.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/file.c b/file.c index 6c83caac..91698a4c 100644 --- a/file.c +++ b/file.c @@ -177,9 +177,9 @@ file_fire_read(struct client_file *cf) int file_can_print(struct client *c) { - if (c == NULL) - return (0); - if (c->session != NULL && (~c->flags & CLIENT_CONTROL)) + if (c == NULL || + (c->flags & CLIENT_ATTACHED) || + (c->flags & CLIENT_CONTROL)) return (0); return (1); } -- 2.11.4.GIT