CTFBot.Program.SendMessageFMulti C# (CSharp) Method

SendMessageFMulti() public static method

Splitting messages by line breaks and in chucks if they're too long and forward to SendMessageF
public static SendMessageFMulti ( SendType type, string destination, string message, bool IsDroppable, bool IsPriority ) : void
type SendType
destination string
message string
IsDroppable bool
IsPriority bool
return void
        public static void SendMessageFMulti(SendType type, string destination, string message, bool IsDroppable, bool IsPriority)
        {
            if (message != "")
            {
                //Allow multiline
                foreach (string line in message.Split(new char[1] { '\n' }))
                {
                    //Chunk messages that are too long
                    foreach (string chunk in CTFUtils.stringSplit(line, 400))
                    {
                        // Ignore "" and "
                        if ((chunk.Trim() != "\"\"") && (chunk.Trim() != "\"")){
                            SendMessageF(type, destination, chunk, IsDroppable, IsPriority);
                        }
                    }
                }
            }
        }