comparison mcabber/src/screen.c @ 1294:86caabe72f3a

Color only incoming messages
author Michal 'vorner' Vaner <vorner@ucw.cz>
date Tue, 28 Aug 2007 10:52:15 +0200
parents 382ec54b584e
children 33cb828282d5
comparison
equal deleted inserted replaced
1293:359e1c53552a 1294:86caabe72f3a
1034 1034
1035 // Make sure we are at the right position 1035 // Make sure we are at the right position
1036 wmove(win_entry->win, n, getprefixwidth()-1); 1036 wmove(win_entry->win, n, getprefixwidth()-1);
1037 1037
1038 //The MUC nick - overwrite with propper color 1038 //The MUC nick - overwrite with propper color
1039 if (line->mucnicklen && (line->flags & HBB_PREFIX_IN)) { 1039 if (line->mucnicklen) {
1040 //Store the char after the nick 1040 //Store the char after the nick
1041 char tmp = line->text[line->mucnicklen]; 1041 char tmp = line->text[line->mucnicklen];
1042 muccoltype type = glob_muccol, *typetmp; 1042 muccoltype type = glob_muccol, *typetmp;
1043 //Terminate the string after the nick 1043 //Terminate the string after the nick
1044 line->text[line->mucnicklen] = '\0'; 1044 line->text[line->mucnicklen] = '\0';
1066 g_hash_table_insert(nickcolors, snick, nc); 1066 g_hash_table_insert(nickcolors, snick, nc);
1067 g_hash_table_insert(nickcolors, mnick, nc); 1067 g_hash_table_insert(nickcolors, mnick, nc);
1068 } 1068 }
1069 if (nickcolors) 1069 if (nickcolors)
1070 actual = g_hash_table_lookup(nickcolors, line->text); 1070 actual = g_hash_table_lookup(nickcolors, line->text);
1071 if (actual && ((type == MC_ALL) || (actual->manual))) 1071 if (actual && ((type == MC_ALL) || (actual->manual))
1072 && (line->flags & HBB_PREFIX_IN) &&
1073 (!(line->flags & HBB_PREFIX_HLIGHT_OUT)))
1072 wattrset(win_entry->win, get_color(actual->color)); 1074 wattrset(win_entry->win, get_color(actual->color));
1073 wprintw(win_entry->win, "%s", line->text); 1075 wprintw(win_entry->win, "%s", line->text);
1074 //Return the char 1076 //Return the char
1075 line->text[line->mucnicklen] = tmp; 1077 line->text[line->mucnicklen] = tmp;
1076 //Return the color back 1078 //Return the color back