public static void PrivateMessage(ChatUser from, Channel channel, string param) { int indexOf = param.IndexOf(' '); string name = param.Substring(0, indexOf); string text = param.Substring(indexOf + 1); ChatUser target = ChatSystem.SearchForUser(from, name); if (target == null) { return; } if (target.IsIgnored(from)) { from.SendMessage(35, target.Username); // %1 has chosen to ignore you. None of your messages to them will get through. } else if (target.IgnorePrivateMessage) { from.SendMessage(42, target.Username); // %1 has chosen to not receive private messages at the moment. } else { target.SendMessage(59, from.Mobile, from.GetColorCharacter() + from.Username, text); // [%1]: %2 } }
public static void ToggleIgnore(ChatUser from, Channel channel, string param) { ChatUser target = ChatSystem.SearchForUser(from, param); if (target == null) { return; } if (from.IsIgnored(target)) { from.RemoveIgnored(target); } else { from.AddIgnored(target); } }
public static void ToggleIgnore( ChatUser from, Channel channel, string param ) { ChatUser target = ChatSystem.SearchForUser( from, param ); if ( target == null ) return; if ( from.IsIgnored( target ) ) from.RemoveIgnored( target ); else from.AddIgnored( target ); }