Esempio n. 1
0
    void CheckTextInput(string input)
    {
        string filterInput = input.ToLower();


        if (Uri.IsWellFormedUriString(input, UriKind.Absolute))
        {
            ContentType content = CheckHeaderInfo(input);
            Debug.Log(content);
            switch (content)
            {
            case ContentType.Image:

                memes.PostImage(input);



                break;

            case ContentType.Gif:
                memes.PostGif(input);
                break;

            case ContentType.Video:
                videoPlayer.AddWebm(input);
                break;

            case ContentType.Text:
                // attempt Youtube-dl Shit
                //TODO: Put Youtube-dl on a server, and get link data from there
                YoutubeDLCaller.GetLinks(input);
                break;
            }
        }



        else if (input.Contains("218"))
        {
            //do 218 memes
            Comment(input);
        }



        else if (filterInput.StartsWith("changefont"))
        {
            string data = filterInput.Substring(filterInput.IndexOf("changefont") + 11);
            if (data == "comic sans")
            {
                comments.ChangeFont(fonts[1]);
            }

            else if (data == "papyrus")
            {
                comments.ChangeFont(fonts[2]);
            }

            else if (data == "persona")
            {
                comments.ChangeFont(fonts[3]);
            }

            else
            {
                comments.ChangeFont(fonts[0]);
            }
        }

        else if (filterInput.Contains("joep's moeder") || filterInput.Contains("joeps moeder") || filterInput.Contains("sophie's schoonmoeder") || filterInput.Contains("sophies schoonmoeder"))
        {
            //play MGS joep's moeder
            Comment(input);
        }

        else
        {
            Comment(input);
        }
    }