summaryrefslogtreecommitdiff
path: root/src/gui/curses/gui-display.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2005-02-15 20:03:35 +0000
committerSebastien Helleu <flashcode@flashtux.org>2005-02-15 20:03:35 +0000
commit84f84823c9e6889072cdc6b3d7c0dbf1fb3dc00f (patch)
treecea5ed15f4b0b69cda69d598db420254aa6f26d1 /src/gui/curses/gui-display.c
parent0d21ca207d05ffa06f071677067b634f512c07a9 (diff)
downloadweechat-84f84823c9e6889072cdc6b3d7c0dbf1fb3dc00f.zip
Added support for UnrealIrcd ("~" for chan owner, "&" for chan admin)
Diffstat (limited to 'src/gui/curses/gui-display.c')
-rw-r--r--src/gui/curses/gui-display.c56
1 files changed, 34 insertions, 22 deletions
diff --git a/src/gui/curses/gui-display.c b/src/gui/curses/gui-display.c
index d19338cd7..ec488e310 100644
--- a/src/gui/curses/gui-display.c
+++ b/src/gui/curses/gui-display.c
@@ -851,35 +851,41 @@ gui_draw_buffer_nick (t_gui_buffer *buffer, int erase)
x = column;
break;
}
- if (ptr_nick->is_op)
+ if (ptr_nick->is_chanowner)
+ {
+ gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_CHANOWNER);
+ mvwprintw (ptr_win->win_nick, y, x, "~");
+ x++;
+ }
+ else if (ptr_nick->is_chanadmin)
+ {
+ gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_CHANADMIN);
+ mvwprintw (ptr_win->win_nick, y, x, "&");
+ x++;
+ }
+ else if (ptr_nick->is_op)
{
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_OP);
mvwprintw (ptr_win->win_nick, y, x, "@");
x++;
}
+ else if (ptr_nick->is_halfop)
+ {
+ gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_HALFOP);
+ mvwprintw (ptr_win->win_nick, y, x, "%%");
+ x++;
+ }
+ else if (ptr_nick->has_voice)
+ {
+ gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_VOICE);
+ mvwprintw (ptr_win->win_nick, y, x, "+");
+ x++;
+ }
else
{
- if (ptr_nick->is_halfop)
- {
- gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_HALFOP);
- mvwprintw (ptr_win->win_nick, y, x, "%%");
- x++;
- }
- else
- {
- if (ptr_nick->has_voice)
- {
- gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_VOICE);
- mvwprintw (ptr_win->win_nick, y, x, "+");
- x++;
- }
- else
- {
- gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK);
- mvwprintw (ptr_win->win_nick, y, x, " ");
- x++;
- }
- }
+ gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK);
+ mvwprintw (ptr_win->win_nick, y, x, " ");
+ x++;
}
gui_window_set_color (ptr_win->win_nick,
(ptr_nick->is_away) ?
@@ -2011,6 +2017,10 @@ gui_init_colors ()
cfg_col_nick & A_CHARTEXT, cfg_col_nick_bg);
init_pair (COLOR_WIN_NICK_AWAY,
cfg_col_nick_away & A_CHARTEXT, cfg_col_nick_bg);
+ init_pair (COLOR_WIN_NICK_CHANOWNER,
+ cfg_col_nick_chanowner & A_CHARTEXT, cfg_col_nick_bg);
+ init_pair (COLOR_WIN_NICK_CHANADMIN,
+ cfg_col_nick_chanadmin & A_CHARTEXT, cfg_col_nick_bg);
init_pair (COLOR_WIN_NICK_OP,
cfg_col_nick_op & A_CHARTEXT, cfg_col_nick_bg);
init_pair (COLOR_WIN_NICK_HALFOP,
@@ -2071,6 +2081,8 @@ gui_init_colors ()
color_attr[COLOR_WIN_INPUT_NICK - 1] = (cfg_col_input_nick >= 0) ? cfg_col_input_nick & A_BOLD : 0;
color_attr[COLOR_WIN_NICK - 1] = (cfg_col_nick >= 0) ? cfg_col_nick & A_BOLD : 0;
color_attr[COLOR_WIN_NICK_AWAY - 1] = (cfg_col_nick_away >= 0) ? cfg_col_nick_away & A_BOLD : 0;
+ color_attr[COLOR_WIN_NICK_CHANOWNER - 1] = (cfg_col_nick_chanowner >= 0) ? cfg_col_nick_chanowner & A_BOLD : 0;
+ color_attr[COLOR_WIN_NICK_CHANADMIN - 1] = (cfg_col_nick_chanadmin >= 0) ? cfg_col_nick_chanadmin & A_BOLD : 0;
color_attr[COLOR_WIN_NICK_OP - 1] = (cfg_col_nick_op >= 0) ? cfg_col_nick_op & A_BOLD : 0;
color_attr[COLOR_WIN_NICK_HALFOP - 1] = (cfg_col_nick_halfop >= 0) ? cfg_col_nick_halfop & A_BOLD : 0;
color_attr[COLOR_WIN_NICK_VOICE - 1] = (cfg_col_nick_voice >= 0) ? cfg_col_nick_voice & A_BOLD : 0;