Hacker News new | past | comments | ask | show | jobs | submit login

I wonder what could have been done to fix this bug. Does anyone with more experience with the game have any ideas?



Do not send messages while your status is drunk. It is a solution in real life as well.


Bravo!


I see what you did there


You could encode the data in a format that would be resistant to this transformation.

We'd need to know the specifics of this transformation to build something adequate.


When I first read your message, “resistant to this transformation” made me think of _avoiding_ characters / pairs / whatever that are transformed: make sure the message is the same whether sober or drunk.

If the specifics of the transform are known, I think you could also start with a prefix that the receiver could use to determine drunk vs sober, and have two different decoding paths.

And I’m not sure whether you meant both meanings or not, but maybe elaborating will help someone else.


Since a lot of people don't remember / haven't played the game, here are the details that can help you:

- You can determine drunken state using the game's front-end API. They call debuffs/buffs 'auras' and you can match it against a specific set of drunken aura ids. - The game will randomly add Hs and iirc the word "hic" to a sentence in order to emulate drunkenness.

Personally, I like the checksum solution the best -- don't even try to be smart, just validate the integrity of the message. This also solves issues where your message gets truncated, or other problems arise. They also likely had to break up their messages across multiple chat messages (there's chat limit) so a checksum goes a long way here.


Add checksum and discard corrupted message?


This is the cleanest solution, IMO, rather than having to check each word/key/whatever of your protocol.


Depending on how the message is changed you might not be able to trust the checksum as well


A checksum is usually intended not to match if the checksum itself is corrupted.


Use an encoding with forward error correction of course!

I think sending everything twice when drunk -- and letting the receiver figure it out -- would be most true to the drunk behaviour.


Simply pausing the addon on drunk players would have been enough.


With a little admonition of course.


Make the chat deserializer "decode" from "sh" to "s" and so on.


That ruins every "sharon" in the data set, though.


I'm sure we'd figure something out. :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: