internal static void RostManager_OnRosterItem(object sender, jabber.protocol.iq.Item ri) { UpdatePlayers = true; if (!AllPlayers.ContainsKey(ri.JID.User)) { ChatPlayerItem player = new ChatPlayerItem(); player.Id = ri.JID.User; player.Group = "Online"; using (XmlReader reader = XmlReader.Create(new StringReader(ri.OuterXml))) { while (reader.Read()) { if (reader.IsStartElement()) { switch (reader.Name) { case "group": reader.Read(); string TempGroup = reader.Value; if (TempGroup != "**Default") { player.Group = TempGroup; } break; } } } } player.Username = ri.Nickname; bool PlayerPresence = PresManager.IsAvailable(ri.JID); AllPlayers.Add(ri.JID.User, player); } }
internal static void RostManager_OnRosterItem(object sender, jabber.protocol.iq.Item ri) { UpdatePlayers = true; if (!AllPlayers.ContainsKey(ri.JID.User)) { ChatPlayerItem player = new ChatPlayerItem(); player.Id = ri.JID.User; player.Username = ri.Nickname; bool PlayerPresence = PresManager.IsAvailable(ri.JID); AllPlayers.Add(ri.JID.User, player); } }