Mercurial > hg > nnchat
comparison main.c @ 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 | ba5807ebff88 |
children | 5d1a832d6e61 |
comparison
equal
deleted
inserted
replaced
529:f1275e7c79ab | 530:f0bca971170b |
---|---|
465 } | 465 } |
466 else | 466 else |
467 { | 467 { |
468 // It's a normal message | 468 // It's a normal message |
469 char *h; | 469 char *h; |
470 int colorNick, colorText; | |
470 t = nn_strip_tags(msg); | 471 t = nn_strip_tags(msg); |
471 h = nn_decode_str2(t); | 472 h = nn_decode_str2(t); |
473 if (isMine) | |
474 { | |
475 colorNick = 14; | |
476 colorText = 0; | |
477 } | |
478 else | |
479 { | |
480 if (checkNameList(setFriendList, name)) | |
481 { | |
482 colorNick = 5; | |
483 colorText = 1; | |
484 } | |
485 else | |
486 { | |
487 colorNick = 15; | |
488 colorText = 0; | |
489 } | |
490 } | |
491 | |
472 printMsgF(NULL, isIgnored ? LOG_FILE : (LOG_WINDOW | LOG_FILE), | 492 printMsgF(NULL, isIgnored ? LOG_FILE : (LOG_WINDOW | LOG_FILE), |
473 "½5½<½%d½%s½5½>½0½ %s\n", isMine ? 14 : 15, name, h); | 493 "½5½<½%d½%s½5½>½%d½ %s½0½\n", colorNick, name, colorText, h); |
474 th_free(h); | 494 th_free(h); |
475 th_free(t); | 495 th_free(t); |
476 } | 496 } |
477 | 497 |
478 done: | 498 done: |