diff --git a/cfg.c b/cfg.c index 98254fdb..7d2bbe49 100644 --- a/cfg.c +++ b/cfg.c @@ -222,10 +222,14 @@ cfg_add_cause(const char *fmt, ...) void cfg_print_causes(struct cmdq_item *item) { - u_int i; + struct client *c = cmdq_get_client(item); + u_int i; for (i = 0; i < cfg_ncauses; i++) { - cmdq_print(item, "%s", cfg_causes[i]); + if (c != NULL && (c->flags & CLIENT_CONTROL)) + control_write(c, "%%config-error %s", cfg_causes[i]); + else + cmdq_print(item, "%s", cfg_causes[i]); free(cfg_causes[i]); } diff --git a/cmd-source-file.c b/cmd-source-file.c index ea477d1b..9ab9e20e 100644 --- a/cmd-source-file.c +++ b/cmd-source-file.c @@ -202,7 +202,7 @@ cmd_source_file_exec(struct cmd *self, struct cmdq_item *item) cdata->flags |= CMD_PARSE_QUIET; if (args_has(args, 'n')) cdata->flags |= CMD_PARSE_PARSEONLY; - if (args_has(args, 'v')) + if (args_has(args, 'v') && (~c->flags & CLIENT_CONTROL)) cdata->flags |= CMD_PARSE_VERBOSE; cwd = cmd_source_file_quote_for_glob(server_client_get_cwd(c, NULL));