From eb53b10bc61c4e9bd6d06b43d50b6328095d439a Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Mon, 13 Jul 2020 17:30:32 +0200 Subject: ssh/client: Better event formatting --- ssh/client.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ssh') 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; -- cgit v1.2.3-70-g09d2