| 261 | static cc_bool wom_sendId, wom_sentId; |
| 262 | |
| 263 | static void WoM_CheckMotd(void) { |
| 264 | cc_string url; char urlBuffer[STRING_SIZE]; |
| 265 | cc_string motd, host; |
| 266 | int index; |
| 267 | |
| 268 | motd = Server.MOTD; |
| 269 | if (!motd.length) return; |
| 270 | index = String_IndexOfConst(&motd, "cfg="); |
| 271 | if (Game_PureClassic || index == -1) return; |
| 272 | |
| 273 | host = String_UNSAFE_SubstringAt(&motd, index + 4); |
| 274 | String_InitArray(url, urlBuffer); |
| 275 | String_Format1(&url, "http://%s", &host); |
| 276 | /* TODO: Replace $U with username */ |
| 277 | /*url = url.Replace("$U", game.Username); */ |
| 278 | |
| 279 | /* Ensure that if the user quickly changes to a different world, env settings from old world aren't |
| 280 | applied in the new world if the async 'get env request' didn't complete before the old world was unloaded */ |
| 281 | wom_identifier = Http_AsyncGetData(&url, HTTP_FLAG_PRIORITY); |
| 282 | wom_sendId = true; |
| 283 | } |
| 284 | |
| 285 | static void WoM_CheckSendWomID(void) { |
| 286 | static const cc_string msg = String_FromConst("/womid WoMClient-2.0.7"); |
no test coverage detected