# HG changeset patch # User Matti Hamalainen # Date 1338988853 -10800 # Node ID f0bca971170b1e240ae9c1ce20d9c76deeb3f48b # Parent f1275e7c79ab5334a2d30285808d5b5e466a0148 Change coloring to use friend list as well. diff -r f1275e7c79ab -r f0bca971170b main.c --- a/main.c Wed Jun 06 00:00:06 2012 +0300 +++ b/main.c Wed Jun 06 16:20:53 2012 +0300 @@ -467,10 +467,30 @@ { // It's a normal message char *h; + int colorNick, colorText; t = nn_strip_tags(msg); h = nn_decode_str2(t); + if (isMine) + { + colorNick = 14; + colorText = 0; + } + else + { + if (checkNameList(setFriendList, name)) + { + colorNick = 5; + colorText = 1; + } + else + { + colorNick = 15; + colorText = 0; + } + } + printMsgF(NULL, isIgnored ? LOG_FILE : (LOG_WINDOW | LOG_FILE), - "½5½<½%d½%s½5½>½0½ %s\n", isMine ? 14 : 15, name, h); + "½5½<½%d½%s½5½>½%d½ %s½0½\n", colorNick, name, colorText, h); th_free(h); th_free(t); }