internal TS3Channel(Dictionary <string, string> clist, List <Dictionary <string, string> > allchan, List <Dictionary <string, string> > alluser, TS3GroupList servergroups, TS3GroupList channelgroups) { this.cdata = clist; foreach (Dictionary <string, string> current in allchan) { int num = -1; if (current.ContainsKey("pid") && !int.TryParse(current["pid"], out num)) { num = -1; } if (num == this.ID) { this.subchannels.Add(new TS3Channel(current, allchan, alluser, servergroups, channelgroups)); } } foreach (Dictionary <string, string> current2 in alluser) { int num2 = -1; if (current2.ContainsKey("cid") && !int.TryParse(current2["cid"], out num2)) { num2 = -1; } if (num2 == this.ID) { int num3 = -1; if (current2.ContainsKey("client_type") && !int.TryParse(current2["client_type"], out num3)) { num3 = -1; } if (num3 != 1) { this.user.Add(new TS3User(current2, servergroups, channelgroups)); } } } }
internal TS3User(Dictionary <string, string> ulist, TS3GroupList servergroups, TS3GroupList channelgroups) { this.udata = ulist; string text = this["client_servergroups"]; if (text != null) { string[] array; if (text.IndexOf(',') > 0) { array = text.Split(new char[] { ',' }); } else { array = new string[] { text }; } string[] array2 = array; for (int i = 0; i < array2.Length; i++) { string b = array2[i]; foreach (TS3Group current in servergroups) { if (current.ID.ToString() == b) { this.sgroups.Add(current); } } } } text = this["client_channel_group_id"]; if (text != null) { string[] array3; if (text.IndexOf(',') > 0) { array3 = text.Split(new char[] { ',' }); } else { array3 = new string[] { text }; } string[] array4 = array3; for (int j = 0; j < array4.Length; j++) { string b2 = array4[j]; foreach (TS3Group current2 in channelgroups) { if (current2.ID.ToString() == b2) { this.cgroups.Add(current2); } } } } }