| 1090 | { |
| 1091 | return identities[i].dpnid; |
| 1092 | } |
| 1093 | } |
| 1094 | return AI_PLAYER; // not found |
| 1095 | } |
| 1096 | RString GetIdentityText(const PlayerIdentity& identity) |
| 1097 | { |
| 1098 | RString spec = Format("%d ms", identity._avgPing); |
| 1099 | if (identity._rights & PRServer) |
| 1100 | { |
| 1101 | spec = LocalizeString(IDS_MP_SERVER); |
| 1102 | } |
| 1103 | else if (identity._rights & (PRAdmin | PRVotedAdmin)) |
| 1104 | { |
| 1105 | if (identity._rights & PRVotedAdmin) |
| 1106 | { |
| 1107 | spec = spec + RString(", ") + LocalizeString(IDS_MP_MASTER); |
| 1108 | } |
| 1109 | else |
| 1110 | { |
| 1111 | spec = spec + RString(", *") + LocalizeString(IDS_MP_MASTER) + RString("*"); |
| 1112 | } |
| 1113 | } |
| 1114 | return Format("%s (%s)", (const char*)identity.name, (const char*)spec); |
no test coverage detected