degesch: colour the user@host part
This commit is contained in:
parent
62c55858d0
commit
2c95c406f4
18
degesch.c
18
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);
|
||||
|
|
Loading…
Reference in New Issue