public void FindLinks(string[] words, FileType type, TasClient tas, TasSayEventArgs e) { if (words.Length == 0) { Battle b = tas.MyBattle; if (b == null) { return; } ah.Respond(e, string.Format("Getting Zero-K mirrors for currently hosted {0}", type)); if (type == FileType.Map) { plasmaService.DownloadFileAsync(b.MapName, e); } else { plasmaService.DownloadFileAsync(b.ModName, e); } } else { int[] resultIndexes; string[] resultVals; int cnt; if (type == FileType.Map) { cnt = ah.FilterMaps(words, out resultVals, out resultIndexes); } else { cnt = ah.FilterMods(words, out resultVals, out resultIndexes); } if (cnt == 0) { ah.Respond(e, string.Format("No such {0} found", type)); } else { ah.Respond(e, string.Format("Getting Zero-K mirrors for {0}, please wait", resultVals[0])); plasmaService.DownloadFileAsync(resultVals[0], e); } } }