summaryrefslogtreecommitdiffstats
path: root/cmd-show-messages.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2017-04-22 12:01:19 +0100
committerThomas Adam <thomas@xteddy.org>2017-04-22 12:01:19 +0100
commite802b683ea0ebfa377a5bb8a6b03454c1edbe2d5 (patch)
tree7a495bed6d4d979974826a11707f1c2585173768 /cmd-show-messages.c
parentb08e451c916fd942b9d24706583ccedf307e0877 (diff)
parent55cd4c7bc756509f241788f7f73676676ef538f6 (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-show-messages.c')
-rw-r--r--cmd-show-messages.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd-show-messages.c b/cmd-show-messages.c
index e7e56172..21511b48 100644
--- a/cmd-show-messages.c
+++ b/cmd-show-messages.c
@@ -38,8 +38,6 @@ const struct cmd_entry cmd_show_messages_entry = {
.args = { "JTt:", 0, 0 },
.usage = "[-JT] " CMD_TARGET_CLIENT_USAGE,
- .tflag = CMD_CLIENT,
-
.flags = CMD_AFTERHOOK,
.exec = cmd_show_messages_exec
};
@@ -91,11 +89,14 @@ static enum cmd_retval
cmd_show_messages_exec(struct cmd *self, struct cmdq_item *item)
{
struct args *args = self->args;
- struct client *c = item->state.c;
+ struct client *c;
struct message_entry *msg;
char *tim;
int done, blank;
+ if ((c = cmd_find_client(item, args_get(args, 't'), 0)) == NULL)
+ return (CMD_RETURN_ERROR);
+
done = blank = 0;
if (args_has(args, 'T')) {
blank = cmd_show_messages_terminals(item, blank);