summaryrefslogtreecommitdiffstats
path: root/cmd-show-messages.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-show-messages.c')
-rw-r--r--cmd-show-messages.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/cmd-show-messages.c b/cmd-show-messages.c
index 84c2d6ce..5979e8c3 100644
--- a/cmd-show-messages.c
+++ b/cmd-show-messages.c
@@ -31,25 +31,24 @@ int cmd_show_messages_exec(struct cmd *, struct cmd_ctx *);
const struct cmd_entry cmd_show_messages_entry = {
"show-messages", "showmsgs",
+ "t:", 0, 0,
CMD_TARGET_CLIENT_USAGE,
- 0, "",
- cmd_target_init,
- cmd_target_parse,
- cmd_show_messages_exec,
- cmd_target_free,
- cmd_target_print
+ 0,
+ NULL,
+ NULL,
+ cmd_show_messages_exec
};
int
cmd_show_messages_exec(struct cmd *self, struct cmd_ctx *ctx)
{
- struct cmd_target_data *data = self->data;
- struct client *c;
- struct message_entry *msg;
- char *tim;
- u_int i;
+ struct args *args = self->args;
+ struct client *c;
+ struct message_entry *msg;
+ char *tim;
+ u_int i;
- if ((c = cmd_find_client(ctx, data->target)) == NULL)
+ if ((c = cmd_find_client(ctx, args_get(args, 't'))) == NULL)
return (-1);
for (i = 0; i < ARRAY_LENGTH(&c->message_log); i++) {