Server.Misc.ProfanityProtection.OnProfanityDetected C# (CSharp) Méthode

OnProfanityDetected() private static méthode

private static OnProfanityDetected ( Mobile from ) : bool
from Mobile
Résultat bool
		private static bool OnProfanityDetected( Mobile from )
		{
			switch ( Action )
			{
				case ProfanityAction.None: return true;
				case ProfanityAction.Disallow: return false;
				case ProfanityAction.Criminal: from.Criminal = true; return true;
				case ProfanityAction.CriminalAction: from.CriminalAction( false ); return true;
				case ProfanityAction.Disconnect:
				{
					NetState ns = from.NetState;

					if ( ns != null )
						ns.Dispose();

					return false;
				}
				default:
				case ProfanityAction.Other: // TODO: Provide custom implementation if this is chosen
				{
					return true;
				}
			}
		}