| 684 | |
| 685 | |
| 686 | void cProtocol125::SendPlayerListItem(const cPlayer & a_Player, bool a_IsOnline) |
| 687 | { |
| 688 | cCSLock Lock(m_CSPacket); |
| 689 | AString PlayerName(a_Player.GetColor()); |
| 690 | PlayerName.append(a_Player.GetName()); |
| 691 | if (PlayerName.length() > 14) |
| 692 | { |
| 693 | PlayerName.erase(14); |
| 694 | } |
| 695 | PlayerName += cChatColor::White; |
| 696 | |
| 697 | WriteByte ((unsigned char)PACKET_PLAYER_LIST_ITEM); |
| 698 | WriteString(PlayerName); |
| 699 | WriteBool (a_IsOnline); |
| 700 | WriteShort (a_IsOnline ? a_Player.GetClientHandle()->GetPing() : 0); |
| 701 | Flush(); |
| 702 | } |
| 703 | |
| 704 | |
| 705 |
nothing calls this directly
no test coverage detected