From 635c28820da3ef959efd8a65305d75f3986ad253 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Tue, 21 Apr 2015 00:09:06 +0200 Subject: degesch: fix logging a bit It needs a rewrite. --- degesch.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/degesch.c b/degesch.c index a18afea..9a44dad 100644 --- a/degesch.c +++ b/degesch.c @@ -901,7 +901,7 @@ buffer_line_display (struct app_context *ctx, struct buffer_line *line) char *nick = NULL; const char *userhost = NULL; - if (who) + if (*who) { nick = irc_cut_nickname (who); userhost = irc_find_userhost (who); @@ -919,14 +919,14 @@ buffer_line_display (struct app_context *ctx, struct buffer_line *line) str_append_printf (&text, " - Notice(%s): %s", nick, object); break; case BUFFER_LINE_JOIN: - if (who) + if (*who) str_append_printf (&text, "--> %s (%s) has joined %s", nick, userhost, object); else str_append_printf (&text, "--> You have joined %s", object); break; case BUFFER_LINE_PART: - if (who) + if (*who) str_append_printf (&text, "<-- %s (%s) has left %s (%s)", nick, userhost, object, reason); else @@ -934,7 +934,7 @@ buffer_line_display (struct app_context *ctx, struct buffer_line *line) object, reason); break; case BUFFER_LINE_KICK: - if (who) + if (*who) str_append_printf (&text, "<-- %s has kicked %s (%s)", nick, object, reason); else @@ -942,14 +942,14 @@ buffer_line_display (struct app_context *ctx, struct buffer_line *line) object, reason); break; case BUFFER_LINE_NICK: - if (who) - str_append_printf (&text, "<-- %s is now known as %s", + if (*who) + str_append_printf (&text, " - %s is now known as %s", nick, object); else - str_append_printf (&text, "<-- You are now known as %s", object); + str_append_printf (&text, " - You are now known as %s", object); break; case BUFFER_LINE_QUIT: - if (who) + if (*who) str_append_printf (&text, "<-- %s (%s) has quit (%s)", nick, userhost, reason); else -- cgit v1.2.3-70-g09d2