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.SendAsciiMessage(35, target.Username); // %1 has chosen to ignore you. None of your messages to them will get through. } else if (target.IgnorePrivateMessage) { from.SendAsciiMessage(42, target.Username); // %1 has chosen to not receive private messages at the moment. } else { target.SendAsciiMessage(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 void SendIgnorableMessage(int number, ChatUser from, string param1, string param2) { for (int i = 0; i < m_Users.Count; ++i) { ChatUser user = (ChatUser)m_Users[i]; if (user.IsIgnored(from)) { continue; } if (user.CheckOnline()) { user.SendMessage(number, from.Mobile, param1, param2); } else if (!Contains(user)) { --i; } } }
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 ); }