private void HandleGroupIM(InstantMessageEventArgs e) { // Ignore group IM from a muted group if (null != client.Self.MuteList.Find(me => me.Type == MuteType.Group && (me.ID == e.IM.IMSessionID || me.ID == e.IM.FromAgentID))) { return; } if (TabExists(e.IM.IMSessionID.ToString())) { METAboltTab tab = tabs[e.IM.IMSessionID.ToString()]; tab.Highlight(); return; } instance.MediaManager.PlayUISound(UISounds.IM); Control active = FindFocusedControl(instance.MainForm); GroupIMTabWindow imTab = AddGroupIMTab(e.IM.IMSessionID, Utils.BytesToString(e.IM.BinaryBucket)); imTab.TextManager.ProcessIM(e); tabs[e.IM.IMSessionID.ToString()].Highlight(); if (active != null) { active.Focus(); } }
public GroupIMTabWindow AddGroupIMTab(UUID session, string name) { GroupIMTabWindow imTab = new GroupIMTabWindow(instance, session, name); METAboltTab tab = AddTab(session.ToString(), name, imTab); imTab.SelectIMInput(); return(imTab); }