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 EmoteMessage( ChatUser from, Channel channel, string param ) { if ( channel.CanTalk( from ) ) channel.SendIgnorableMessage( 58, from, from.GetColorCharacter() + from.Username, param ); // %1 %2 else from.SendMessage( 36 ); // The moderator of this conference has not given you speaking priviledges. }
public static void ChannelMessage(ChatUser from, Channel channel, string param) { if (from.NextMessage < Core.TickCount) { channel.SendMessage(57, from, from.GetColorCharacter() + from.Username, string.Format("{{{0}}} {1}", channel.Name, param)); // %1: %2 ChatLogging.LogMessage(channel.Name, from.Username, param); from.NextMessage = Core.TickCount + ChatSystem.ChatDelay; } }
public static void EmoteMessage(ChatUser from, Channel channel, string param) { if (channel.CanTalk(from)) { channel.SendIgnorableMessage(58, from, from.GetColorCharacter() + from.Username, param); // %1 %2 } else { from.SendMessage(36); // The moderator of this conference has not given you speaking priviledges. } }
public static void ChannelMessage(ChatUser from, Channel channel, string param) { channel.SendMessage(57, from, from.GetColorCharacter() + from.Username, string.Format("{{{0}}} {1}", channel.Name, param)); // %1: %2 ChatLogging.LogMessage(channel.Name, from.Username, param); }
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 }