diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2015-05-07 19:39:02 +0200 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2015-05-07 19:39:02 +0200 |
commit | 2c95c406f41c10e7e2f40095f3524c3f36a99da1 (patch) | |
tree | dc5c0bf219b79df62186a9154a31547cbc3b3bc2 | |
parent | 62c55858d0eb6bf7800f5f9777e43232f131d949 (diff) | |
download | xK-2c95c406f41c10e7e2f40095f3524c3f36a99da1.tar.gz xK-2c95c406f41c10e7e2f40095f3524c3f36a99da1.tar.xz xK-2c95c406f41c10e7e2f40095f3524c3f36a99da1.zip |
degesch: colour the user@host part
-rw-r--r-- | degesch.c | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -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); |