diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2020-07-13 17:30:32 +0200 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2020-07-13 17:30:32 +0200 |
commit | eb53b10bc61c4e9bd6d06b43d50b6328095d439a (patch) | |
tree | 2dff640ee900b967c79961a5eaa957311b376257 | |
parent | 62af60991cdf72c0023b5ab45e8670dfbdc7f5dd (diff) |
ssh/client: Better event formatting
-rw-r--r-- | ssh/client.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ssh/client.c b/ssh/client.c index 80e14a4..a763c68 100644 --- a/ssh/client.c +++ b/ssh/client.c @@ -341,7 +341,7 @@ static void print_history_message(const struct history_message msg) { } static void handle_event(struct state *state, const struct tomsg_event event) { - printf("Event(%s):\n", event_type_descr(event.type)); + printf("Event(%s):", event_type_descr(event.type)); if (event.error) { printf(" Error: %s\n", event.error); return; @@ -361,6 +361,7 @@ static void handle_event(struct state *state, const struct tomsg_event event) { break; case TOMSG_EV_LIST_ROOMS: + printf("\n"); for (int64_t i = 0; i < event.list_rooms.count; i++) { printf(" - %s\n", event.list_rooms.rooms[i]); } @@ -431,7 +432,7 @@ static void handle_event(struct state *state, const struct tomsg_event event) { break; case TOMSG_EV_PUSH_MESSAGE: - printf("[%s] ", event.push_message.room_name); + printf("\a [%s] ", event.push_message.room_name); print_history_message(event.push_message.message); break; |