Mercurial > hg > nnchat
changeset 530:f0bca971170b
Change coloring to use friend list as well.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 06 Jun 2012 16:20:53 +0300 |
parents | f1275e7c79ab |
children | 5d1a832d6e61 |
files | main.c |
diffstat | 1 files changed, 21 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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); }