コード例 #1
0
ファイル: ChatActionHandlers.cs プロジェクト: jaedan/runuo
        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
            }
        }
コード例 #2
0
		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.
		}
コード例 #3
0
        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;
            }
        }
コード例 #4
0
ファイル: ChatActionHandlers.cs プロジェクト: jaedan/runuo
 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.
     }
 }
コード例 #5
0
 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);
 }
コード例 #6
0
		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
		}