private void GotIQ(object sender, IQ iq) { switch (iq.Type) { case IQType.get: if (iq.Query is DiscoInfo) { DiscoInfoIQ outdisco = new DiscoInfoIQ(XmppGlobal.InternalClient.Document); outdisco.Query = (XmlElement)disco_info.Clone(); outdisco.To = iq.From; outdisco.ID = iq.ID; outdisco.Type = IQType.result; XmppGlobal.Connection.SendPacket(outdisco); } break; case IQType.result: if (iq.Query is DiscoInfo) { XmppGlobal.InternalQueryCache.DiscoInfo[iq.From.ToString() + "!!!!!" + (iq.Query as DiscoInfo).Node] = iq; } else if (iq.Query is DiscoItems) { XmppGlobal.InternalQueryCache.DiscoItems[iq.From.ToString() + "!!!!!" + (iq.Query as DiscoItems).Node] = iq; } break; } //TODO: dataforms //if (CheckForFormData (iq)) { // DataForm f = new DataForm (); // f.LoadForm (iq); // f.Show (); //} }