summaryrefslogtreecommitdiffstats
path: root/control.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2013-06-23 12:41:54 +0000
committerNicholas Marriott <nicm@openbsd.org>2013-06-23 12:41:54 +0000
commit662d471215d66d3c44a9251cef7d00b25587851d (patch)
treeb740b3c24d890d72c68212bc8d1c570a89ea7ce9 /control.c
parentd6debc21c777dc0e993fd7928bbba51075685491 (diff)
Mark control commands specially so the client can identify them, based
on a diff from George Nachman a while back.
Diffstat (limited to 'control.c')
-rw-r--r--control.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/control.c b/control.c
index 8986f5c6..1f3739fc 100644
--- a/control.c
+++ b/control.c
@@ -55,6 +55,7 @@ control_callback(struct client *c, int closed, unused void *data)
{
char *line, *cause;
struct cmd_list *cmdlist;
+ struct cmd *cmd;
if (closed)
c->flags |= CLIENT_EXIT;
@@ -78,6 +79,8 @@ control_callback(struct client *c, int closed, unused void *data)
free(cause);
} else {
+ TAILQ_FOREACH(cmd, &cmdlist->list, qentry)
+ cmd->flags |= CMD_CONTROL;
cmdq_run(c->cmdq, cmdlist);
cmd_list_free(cmdlist);
}