private void Send() { if (Data.GetData(Owner).Recording == null) { Save(); } if (c_Text.Trim() == "") { Owner.SendMessage(Data.GetData(Owner).SystemC, General.Local(66)); NewGump(); return; } if (c_Subject.Trim() == "") { c_Subject = "No subject"; } if (!TrackSpam.LogSpam(Owner, "Message", TimeSpan.FromSeconds(Data.MsgSpam))) { Owner.SendMessage(Data.GetData(Owner).SystemC, General.Local(97)); NewGump(); return; } if (Data.GetData(Owner).Recording == this) { Data.GetData(Owner).Recording = null; } if (Data.FilterMsg) { c_Text = Filter.FilterText(Owner, c_Text, false); c_Subject = Filter.FilterText(Owner, c_Subject, false); } if (c_MsgType == MsgType.System) { foreach (Data data in Data.Datas.Values) { data.AddMessage(new Message(Owner, c_Subject, c_Text, MsgType.System)); General.PmNotify(data.Mobile); } } else if (c_MsgType == MsgType.Staff) { foreach (Data data in Data.Datas.Values) { if (data.Mobile.AccessLevel != AccessLevel.Player) { data.AddMessage(new Message(Owner, c_Subject, c_Text, MsgType.Staff)); General.PmNotify(data.Mobile); } } } else { Data.GetData(c_To).AddMessage(new Message(Owner, c_Subject, c_Text, MsgType.Normal)); General.PmNotify(c_To); Owner.SendMessage(Data.GetData(Owner).SystemC, General.Local(67) + " " + c_To.RawName); if (Data.GetData(c_To).Status != OnlineStatus.Online) { Owner.SendMessage(Data.GetData(Owner).SystemC, c_To.RawName + ": " + Data.GetData(c_To).AwayMsg); } } if (Data.LogPms) { Logging.LogPm(String.Format(DateTime.Now + " <Mail> {0} to {1}: {2}", Owner.RawName, (c_To == null ? "All" : c_To.RawName), c_Text)); } foreach (Data data in Data.Datas.Values) { if (data.Mobile.AccessLevel >= c_From.AccessLevel && ((data.GlobalM && !data.GIgnores.Contains(c_From)) || data.GListens.Contains(c_From))) { data.Mobile.SendMessage(data.GlobalMC, String.Format("(Global) <Mail> {0} to {1}: {2}", Owner.RawName, (c_To == null ? "All" : c_To.RawName), c_Text)); } } }