diff options
Diffstat (limited to 'cmd-send-prefix.c')
-rw-r--r-- | cmd-send-prefix.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/cmd-send-prefix.c b/cmd-send-prefix.c index eb13b673..ce887dd7 100644 --- a/cmd-send-prefix.c +++ b/cmd-send-prefix.c @@ -1,4 +1,4 @@ -/* $Id: cmd-send-prefix.c,v 1.7 2007-12-06 09:46:22 nicm Exp $ */ +/* $Id: cmd-send-prefix.c,v 1.8 2008-06-02 18:08:16 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -30,19 +30,25 @@ void cmd_send_prefix_exec(void *, struct cmd_ctx *); const struct cmd_entry cmd_send_prefix_entry = { - "send-prefix", NULL, NULL, + "send-prefix", NULL, + CMD_CLIENTONLY_USAGE, 0, - NULL, + cmd_clientonly_parse, cmd_send_prefix_exec, - NULL, - NULL, - NULL + cmd_clientonly_send, + cmd_clientonly_recv, + cmd_clientonly_free }; void -cmd_send_prefix_exec(unused void *ptr, struct cmd_ctx *ctx) +cmd_send_prefix_exec(void *ptr, struct cmd_ctx *ctx) { - window_key(ctx->client->session->curw->window, prefix_key); + struct client *c; + + if ((c = cmd_clientonly_get(ptr, ctx)) == NULL) + return; + + window_key(c->session->curw->window, prefix_key); if (ctx->cmdclient != NULL) server_write_client(ctx->cmdclient, MSG_EXIT, NULL, 0); |