diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-01-11 00:48:42 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-01-11 00:48:42 +0000 |
commit | e3feb067a503b53da253e4ed877d212d6d73842c (patch) | |
tree | f0ebedf15d81253ae1d0437b6dc9f47cbccdc291 /cmd.c | |
parent | ee0a7cda880f01771470b2902839c5d6396057c3 (diff) | |
download | rtmux-e3feb067a503b53da253e4ed877d212d6d73842c.tar.gz rtmux-e3feb067a503b53da253e4ed877d212d6d73842c.tar.bz2 rtmux-e3feb067a503b53da253e4ed877d212d6d73842c.zip |
Server locking. set-password and lock-server commands, plus automatic locking.
Diffstat (limited to 'cmd.c')
-rw-r--r-- | cmd.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: cmd.c,v 1.71 2009-01-10 19:35:39 nicm Exp $ */ +/* $Id: cmd.c,v 1.72 2009-01-11 00:48:42 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -45,6 +45,7 @@ const struct cmd_entry *cmd_table[] = { &cmd_list_keys_entry, &cmd_list_sessions_entry, &cmd_list_windows_entry, + &cmd_lock_server_entry, &cmd_move_window_entry, &cmd_new_session_entry, &cmd_new_window_entry, @@ -63,6 +64,7 @@ const struct cmd_entry *cmd_table[] = { &cmd_server_info_entry, &cmd_set_buffer_entry, &cmd_set_option_entry, + &cmd_set_password_entry, &cmd_set_window_option_entry, &cmd_show_buffer_entry, &cmd_show_options_entry, @@ -159,6 +161,10 @@ usage: void cmd_exec(struct cmd *cmd, struct cmd_ctx *ctx) { + if (server_locked) { + ctx->error(ctx, "server is locked"); + return; + } cmd->entry->exec(cmd, ctx); } |