aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--degesch.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/degesch.c b/degesch.c
index a2d6ece..4a9a83a 100644
--- a/degesch.c
+++ b/degesch.c
@@ -27,6 +27,7 @@
XX( TIMESTAMP, "timestamp", "Terminal attributes for timestamps" ) \
XX( HIGHLIGHT, "highlight", "Terminal attributes for highlights" ) \
XX( ACTION, "action", "Terminal attributes for user actions" ) \
+ XX( USERHOST, "userhost", "Terminal attributes for user@host" ) \
XX( JOIN, "join", "Terminal attributes for joins" ) \
XX( PART, "part", "Terminal attributes for parts" )
@@ -1591,6 +1592,7 @@ init_colors (struct app_context *ctx)
INIT_ATTR (EXTERNAL, g_terminal.color_set_fg[COLOR_WHITE]);
INIT_ATTR (TIMESTAMP, g_terminal.color_set_fg[COLOR_WHITE]);
INIT_ATTR (ACTION, g_terminal.color_set_fg[COLOR_RED]);
+ INIT_ATTR (USERHOST, g_terminal.color_set_fg[COLOR_CYAN]);
INIT_ATTR (JOIN, g_terminal.color_set_fg[COLOR_GREEN]);
INIT_ATTR (PART, g_terminal.color_set_fg[COLOR_RED]);
@@ -2050,22 +2052,22 @@ buffer_line_display (struct app_context *ctx,
break;
case BUFFER_LINE_JOIN:
formatter_add (&f, "#a-->#r ", ATTR_JOIN);
- formatter_add (&f, "#c#s#r (#s) #a#s#r #s",
- nick_color, nick, userhost,
+ formatter_add (&f, "#c#s#r (#a#s#r) #a#s#r #s",
+ nick_color, nick, ATTR_USERHOST, userhost,
ATTR_JOIN, "has joined", a->object);
break;
case BUFFER_LINE_PART:
formatter_add (&f, "#a<--#r ", ATTR_PART);
- formatter_add (&f, "#c#s#r (#s) #a#s#r #s",
- nick_color, nick, userhost,
+ formatter_add (&f, "#c#s#r (#a#s#r) #a#s#r #s",
+ nick_color, nick, ATTR_USERHOST, userhost,
ATTR_PART, "has left", a->object);
if (a->reason)
formatter_add (&f, " (#s)", a->reason);
break;
case BUFFER_LINE_KICK:
formatter_add (&f, "#a<--#r ", ATTR_PART);
- formatter_add (&f, "#c#s#r (#s) #a#s#r #c#s#r",
- nick_color, nick, userhost,
+ formatter_add (&f, "#c#s#r (#a#s#r) #a#s#r #c#s#r",
+ nick_color, nick, ATTR_USERHOST, userhost,
ATTR_PART, "has kicked", object_color, a->object);
if (a->reason)
formatter_add (&f, " (#s)", a->reason);
@@ -2088,8 +2090,8 @@ buffer_line_display (struct app_context *ctx,
break;
case BUFFER_LINE_QUIT:
formatter_add (&f, "#a<--#r ", ATTR_PART);
- formatter_add (&f, "#c#s#r (%s) #a#s#r",
- nick_color, nick, userhost,
+ formatter_add (&f, "#c#s#r (#a%s#r) #a#s#r",
+ nick_color, nick, ATTR_USERHOST, userhost,
ATTR_PART, "has quit");
if (a->reason)
formatter_add (&f, " (#s)", a->reason);