| 244 | } |
| 245 | |
| 246 | void ConVarManager::OnClientDisconnected(int client) |
| 247 | { |
| 248 | /* Remove convar queries for this client that haven't returned results yet */ |
| 249 | for (List<ConVarQuery>::iterator iter = m_ConVarQueries.begin(); iter != m_ConVarQueries.end();) |
| 250 | { |
| 251 | ConVarQuery &query = (*iter); |
| 252 | if (query.client == client) |
| 253 | { |
| 254 | IPluginFunction *pCallback = query.pCallback; |
| 255 | if (pCallback) |
| 256 | { |
| 257 | cell_t ret; |
| 258 | |
| 259 | pCallback->PushCell(query.cookie); |
| 260 | pCallback->PushCell(client); |
| 261 | pCallback->PushCell(eQueryCvarValueStatus_Cancelled); |
| 262 | pCallback->PushString(""); |
| 263 | pCallback->PushString(""); |
| 264 | pCallback->PushCell(query.value); |
| 265 | pCallback->Execute(&ret); |
| 266 | } |
| 267 | iter = m_ConVarQueries.erase(iter); |
| 268 | continue; |
| 269 | } |
| 270 | |
| 271 | ++iter; |
| 272 | } |
| 273 | } |
| 274 | |
| 275 | void ConVarManager::OnHandleDestroy(HandleType_t type, void *object) |
| 276 | { |