| 1143 | NetworkCommandMessage msg; |
| 1144 | msg.type = NCMTUnban; |
| 1145 | msg.content.WriteString(idOrIp); |
| 1146 | SendMsg(&msg, NMFGuaranteed); |
| 1147 | } |
| 1148 | |
| 1149 | void NetworkClient::Disconnect(RString message) |
| 1150 | { |
| 1151 | LOG_DEBUG(Network, "[disconnect] NetworkClient::Disconnect: msg='{}' serverState={} state={}", (const char*)message, |
| 1152 | (int)_serverState, (int)_state); |
| 1153 | RemoveUserMessages(); |
| 1154 | |
| 1155 | _state = NGSNone; |
| 1156 | _serverState = NGSNone; |
| 1157 | |
| 1158 | // Leaving the server: difficulty reverts to the local profile. |
| 1159 | USER_CONFIG.ClearServerDifficulty(); |
| 1160 | |
| 1161 | const PlayerIdentity* id = FindIdentity(_player); |
| 1162 | if (id) |
| 1163 | { |
| 1164 | RString senderName = id->name; |
| 1165 | GChatList.Add(CCGlobal, senderName, message, false, true); |
nothing calls this directly
no test coverage detected