From cf9baddd6f844e8a26f1e7c59ba1c9eb3358571f Mon Sep 17 00:00:00 2001 From: nicm Date: Sat, 16 May 2020 15:45:29 +0000 Subject: Change the existing client flags for control mode to apply for any client, use the same mechanism for the read-only flag and add an ignore-size flag. refresh-client -F has become -f (-F stays for backwards compatibility) and attach-session and switch-client now have -f flags also. A new format "client_flags" lists the flags and is shown by list-clients by default. This separates the read-only flag from "ignore size" behaviour (new ignore-size) flag - both behaviours are useful in different circumstances. attach -r and switchc -r remain and set or toggle both flags together. --- format.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'format.c') diff --git a/format.c b/format.c index a2b2822f..3b9af626 100644 --- a/format.c +++ b/format.c @@ -2678,11 +2678,11 @@ format_defaults_client(struct format_tree *ft, struct client *c) format_add(ft, "client_utf8", "%d", 1); else format_add(ft, "client_utf8", "%d", 0); - if (c->flags & CLIENT_READONLY) format_add(ft, "client_readonly", "%d", 1); else format_add(ft, "client_readonly", "%d", 0); + format_add(ft, "client_flags", "%s", server_client_get_flags(c)); s = c->session; if (s != NULL) -- cgit