summaryrefslogtreecommitdiff
path: root/degesch.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-04-21 00:09:06 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-04-21 00:09:06 +0200
commit635c28820da3ef959efd8a65305d75f3986ad253 (patch)
treecac23393d7f840a3f6dbddef9ad921be85c6fa64 /degesch.c
parent0a87e43aff0346546e10d1ec6523ad7552dfddc2 (diff)
downloadxK-635c28820da3ef959efd8a65305d75f3986ad253.tar.gz
xK-635c28820da3ef959efd8a65305d75f3986ad253.tar.xz
xK-635c28820da3ef959efd8a65305d75f3986ad253.zip
degesch: fix logging a bit
It needs a rewrite.
Diffstat (limited to 'degesch.c')
-rw-r--r--degesch.c16
1 files 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