version 1.30, 2020/04/13 20:51:57 |
version 1.31, 2020/04/13 20:54:15 |
|
|
cmd_show_messages_exec(struct cmd *self, struct cmdq_item *item) |
cmd_show_messages_exec(struct cmd *self, struct cmdq_item *item) |
{ |
{ |
struct args *args = cmd_get_args(self); |
struct args *args = cmd_get_args(self); |
struct client *c; |
struct client *tc = cmdq_get_target_client(item); |
struct message_entry *msg; |
struct message_entry *msg; |
char *tim; |
char *tim; |
int done, blank; |
int done, blank; |
|
|
if (done) |
if (done) |
return (CMD_RETURN_NORMAL); |
return (CMD_RETURN_NORMAL); |
|
|
TAILQ_FOREACH(msg, &c->message_log, entry) { |
TAILQ_FOREACH(msg, &tc->message_log, entry) { |
tim = ctime(&msg->msg_time); |
tim = ctime(&msg->msg_time); |
*strchr(tim, '\n') = '\0'; |
*strchr(tim, '\n') = '\0'; |
|
|
cmdq_print(item, "%s %s", tim, msg->msg); |
cmdq_print(item, "%s %s", tim, msg->msg); |
} |
} |
|
|