public void SendPublicMessage(Mobile from, string text) { if (!((TeiravonMobile)from).CanParty) { return; } SendToAll(new PartyTextMessage(true, from, text)); for (int i = 0; i < m_Listeners.Count; ++i) { Mobile mob = (Mobile)m_Listeners[i]; if (mob.Party != this) { ((Mobile)m_Listeners[i]).SendMessage("[{0}]: {1}", from.Name, text); } } foreach (TeiravonMobile tm in TeiravonMobile.HearAllPartyChat) { tm.SendMessage("[{0}]: {1}", from.Name, text); } if (SpeechLogging.Enabled) { SpeechLogging.WriteLine(from, "{0}: [Party]: {1}", SpeechLogging.Format(from), text); } /* Packet p = null; * * foreach ( NetState ns in from.GetClientsInRange( 8 ) ) * { * Mobile mob = ns.Mobile; * * if ( mob != null && mob.AccessLevel >= AccessLevel.GameMaster && mob.AccessLevel > from.AccessLevel && mob.Party != this && !m_Listeners.Contains( mob ) ) * { * if ( p == null ) * p = new UnicodeMessage( from.Serial, from.Body, MessageType.Regular, from.SpeechHue, 3, from.Language, from.Name, String.Format( "[Party]: {0}", text ) ); * * ns.Send( p ); * } * } */ }
private static void StopListenCallback() { SpeechLogging.SetConsoleListen(false); }
private static void StartListenCallback() { SpeechLogging.SetConsoleListen(true); }