SO-ChatBot icon indicating copy to clipboard operation
SO-ChatBot copied to clipboard

Zalgo can cause messages to be too long

Open BobVul opened this issue 11 years ago • 6 comments

Zalgo messages have to many characters, causing relatively short source messages to exceed the per-line character limit.

Example: http://chat.stackexchange.com/transcript/message/14017140#14017140

Suggested solutions:

  • Split text over multiple lines
    • How would that work with the Unicode diacritics?
    • Also, looks messy[ier]
  • Reduce zalgo-ness of the output, hopefully adding less characters
    • Perhaps combine with splitting over multiple lines

Thoughts?

BobVul avatar Feb 27 '14 16:02 BobVul

!!zalgo adds a random amount of Zalgo-ness to the message, so where one long message might fail, another will work. I can add a MAX_ZALGO or something. Expect a fix in the next few days.

SomeKittens avatar Feb 27 '14 18:02 SomeKittens

IIIRC the guy from serverfault had a patch to span too long messages over multiple messages. Didn't we merge this a while back? It doesn't work with zalgo? Le 27 févr. 2014 19:19, "Randall Koutnik" [email protected] a écrit :

!!zalgo adds a random amount of Zalgo-ness to the message, so where one long message might fail, another will work. I can add a MAX_ZALGO or something. Expect a fix in the next few days.

Reply to this email directly or view it on GitHubhttps://github.com/Zirak/SO-ChatBot/issues/185#issuecomment-36273156 .

ralt avatar Feb 27 '14 18:02 ralt

!! s/serverfault/superuser

And that guy was Bob, I think (the guy who reported this issue).

https://github.com/Zirak/SO-ChatBot/pull/154

Looks like it was merged, but I guess it doesn't apply to zalgo.

allquixotic avatar Feb 27 '14 18:02 allquixotic

My earlier patch for too-long messages was specifically for /listcommands, converting it from multiple messages to multi-line.

In the case of Zalgo, too-long messages don't seem to be handled at all.

But that does seem like a good idea - handle message length closer to the core rather than doing it individually for every command and plugin.

BobVul avatar Feb 28 '14 07:02 BobVul

This is one of those troublesome areas because of Markdown and the chat's ineptness of processing multiline messages. When the bot was created I was just "oh well, this is a problem..." and kinda ignored it, but that doesn't seem to work out any more.

There are two big problems with this:

  1. As you all know, multiline messages fudge up markdown. This can "gracefully" be solved inside commands because they can just run the output-formatting again without using markdown. This is what /google does.
  2. Where do we cut? Obviously every {MAX_MESSAGE_LENGTH} characters is stupid, and then we're concerned with the problem of "what is a word" - if we cut in the beginning of the last word, we might further made the markdown look weird. [this is\na link](http://blah.org), so should we also make it markdown aware, or just ignore it altogether?

The 2nd problem is classic. What if a message is just 1000 characters, no spaces? Then do we cut a hard 500? And in this case Zalgo - what's a "word" in its output? And so on and so on.

But yeah, this is a useful thing to have in core.

Zirak avatar Feb 28 '14 10:02 Zirak

It's true that it's not easy nor reliable to pick a place to cut. But is it worse than failing with an error? I guess that would depend on the command.

BobVul avatar Feb 28 '14 13:02 BobVul