/// <summary> /// Querys the serverinfos /// </summary> public override void GetServerInfo() { base.GetServerInfo(); if (!IsOnline) { return; } Query(_QUERY_STATUS); if (ResponseString.IndexOf("disconnect") != -1) { _isOnline = false; return; } string[] lines = ResponseString.Substring(3).Split('\n'); if (lines.Length < 2) { _isOnline = false; return; } AddParams(lines[1].Split('\\')); if (lines.Length > 2) { for (int i = 2; i < lines.Length; i++) { if (lines[i].Length == 0) { continue; } _players.Add(ParsePlayer(lines[i])); } } }
private string ReadNextString() { int oldOffset = Offset; Offset += Response[Offset - 1]; return(ResponseString.Substring(oldOffset, (Response[oldOffset - 1] - 1))); }