| 1475 /* Don't display this if the person who wrote it is ignored. */ |
1475 /* Don't display this if the person who wrote it is ignored. */ |
| 1476 if (purple_conv_chat_is_user_ignored(chat, who)) |
1476 if (purple_conv_chat_is_user_ignored(chat, who)) |
| 1477 return; |
1477 return; |
| 1478 |
1478 |
| 1479 if (!(flags & PURPLE_MESSAGE_WHISPER)) { |
1479 if (!(flags & PURPLE_MESSAGE_WHISPER)) { |
| 1480 char *str; |
1480 const char *str; |
| 1481 |
1481 |
| 1482 str = g_strdup(purple_normalize(account, who)); |
1482 str = purple_normalize(account, who); |
| 1483 |
1483 |
| 1484 if (!strcmp(str, purple_normalize(account, chat->nick))) { |
1484 if (purple_strequal(str, chat->nick)) { |
| 1485 flags |= PURPLE_MESSAGE_SEND; |
1485 flags |= PURPLE_MESSAGE_SEND; |
| 1486 } else { |
1486 } else { |
| 1487 flags |= PURPLE_MESSAGE_RECV; |
1487 flags |= PURPLE_MESSAGE_RECV; |
| 1488 |
1488 |
| 1489 if (purple_utf8_has_word(message, chat->nick)) |
1489 if (purple_utf8_has_word(message, chat->nick)) |
| 1490 flags |= PURPLE_MESSAGE_NICK; |
1490 flags |= PURPLE_MESSAGE_NICK; |
| 1491 } |
1491 } |
| 1492 |
|
| 1493 g_free(str); |
|
| 1494 } |
1492 } |
| 1495 |
1493 |
| 1496 /* Pass this on to either the ops structure or the default write func. */ |
1494 /* Pass this on to either the ops structure or the default write func. */ |
| 1497 if (conv->ui_ops != NULL && conv->ui_ops->write_chat != NULL) |
1495 if (conv->ui_ops != NULL && conv->ui_ops->write_chat != NULL) |
| 1498 conv->ui_ops->write_chat(conv, who, message, flags, mtime); |
1496 conv->ui_ops->write_chat(conv, who, message, flags, mtime); |