News for hackers. Stuff that matters.
Re:The greatest bug I never fixed (2010) by markbnj on Wednesday May 21, 2014 @12:30PM (#7779122)
That's a great story. How would you have fixed it without having to find another channel to transmit over? Could the plugin sense the character's condition and delay until it abated?
Re:The greatest bug I never fixed (2010) by drzaiusapelord on Wednesday May 21, 2014 @12:54PM (#7779275)
Send a known-good line to test for it.

"FriendnetStart: Hello, I am speaking normally and am not drunk," as the first message. If the application sees anything but that as the first message it should assume drunk and retry in an hour. Or implement a checksum at the end of every line.

I imagine he also had issues with the profanity filter as well. Some usernames may set it off if they have a string of characters in them like username "Breshith," which would set off the filter for the text "shit."

Re:The greatest bug I never fixed (2010) by eyeface on Wednesday May 21, 2014 @01:50PM (#7779650)
If I remember correctly, there's a probability that a line will end with "...hic!" or that s will be replaced with sh. It won't happen every time, so your first message could go through fine. A checksum is probably best.

Character names will never contain punctuation, so expecting a possible terminating "...hic!" and ignoring it is fine.

Re:The greatest bug I never fixed (2010) by DrStalker on Thursday May 22, 2014 @02:08AM (#7782364)
Or the character could get drunk halfway through transmitting, after the first (sober) message.
Re:The greatest bug I never fixed (2010) by tgarv on Wednesday May 21, 2014 @01:03PM (#7779343)
The character could possibly become drunk immediately after sending the "I am not drunk" message, so you'd need to check if the character was still not drunk after sending the FriendNet messages. But assuming that drunkenness lasts much longer than it takes to send the FriendNet messages, you could be sure that if the character was not drunk before and after, then the messages in between were also valid.
Re:The greatest bug I never fixed (2010) by masklinn on Wednesday May 21, 2014 @01:28PM (#7779484)
> so you'd need to check if the character was still not drunk after sending the FriendNet messages

Just send a checksum with the message.

Re:The greatest bug I never fixed (2010) by leorocky on Wednesday May 21, 2014 @01:31PM (#7779515)
Yes this would work, even though the message could get garbled including the checksum, you make the first set of characters be a checksum for the rest. If the checksum or message became compromised it would fail validation. This is the best solution so far. Send it with every message.
Re:The greatest bug I never fixed (2010) by MasterScrat on Wednesday May 21, 2014 @02:26PM (#7779876)
Or use error-correcting codes so you can get your list accross even if you're drunk :D
Re:The greatest bug I never fixed (2010) by masklinn on Wednesday May 21, 2014 @03:35PM (#7780267)
That probably would've worked fine in WoW yeah. Definitely not in EQ though, the "smashed" level made it pretty much impossible to communicate (outside of the channels which were added later on), and the game became… challenging to play
Re:The greatest bug I never fixed (2010) by leorocky on Wednesday May 21, 2014 @04:06PM (#7780470)
What do you mean by error-correcting codes?
Re:The greatest bug I never fixed (2010) by erikano on Wednesday May 21, 2014 @04:44PM (#7780666)
Re:The greatest bug I never fixed (2010) by hibbelig on Wednesday May 21, 2014 @02:45PM (#7779985)
I think it's safe to assume that a drunk checksum would fail to match the message, drunk or sober. So check summing the checksum may not be needed.
Re:The greatest bug I never fixed (2010) by leorocky on Wednesday May 21, 2014 @01:30PM (#7779510)
Or even better, depending on length limits on message, you could prepend every message with a sentence to check. If it is not OK, discard the entire message. If it is, process the rest.
Re:The greatest bug I never fixed (2010) by ktsmith on Wednesday May 21, 2014 @12:56PM (#7779295)
WoW Patch 1.12 released in August of 2006 added a hidden channel for add-on communication that didn't suffer from the drunken text transform. FriendNet was in use and updated well after that patch was released but to the best of my knowledge never moved communication to that channel.

Source: http://www.wowwiki.com/Patch_1.12 New API Functions Add-ons can send hidden chat messages to players in the party, raid or guild, using SendAddonMessage("prefix", "message", "PARTY"|"RAID"|"GUILD"|"BATTLEGROUND").

Re:The greatest bug I never fixed (2010) by yuliyp on Wednesday May 21, 2014 @12:45PM (#7779205)
Convert to hex, replace c with g. That avoids the ...hic and s->sh transforms
Re:The greatest bug I never fixed (2010) by lmm on Wednesday May 21, 2014 @12:34PM (#7779139)
The transform looks fairly simple; just approach it the same way you do error-correction (i.e. reed-solomon), find vectors of characters that are far apart in phase space and use them rather than sending messages directly.
Re:The greatest bug I never fixed (2010) by masklinn on Wednesday May 21, 2014 @01:29PM (#7779497)
ECC's way overkill, just use a CRC and cancel the exchange if users are drunk.
Re:The greatest bug I never fixed (2010) by ajanuary on Wednesday May 21, 2014 @01:01PM (#7779335)
Add a checksum that the client uses the validate the message.
Re:The greatest bug I never fixed (2010) by cpeterso on Wednesday May 21, 2014 @01:00PM (#7779331)
The addon should send a checksum so the receiving end can detect any unexpected changes. Also, the addon should just avoid sending when the character is drunk.
Re:The greatest bug I never fixed (2010) by Serow225 on Wednesday May 21, 2014 @12:48PM (#7779230)
For detection, have the receiver echo back and check that sent == received.
Re:The greatest bug I never fixed (2010) by wingerlang on Wednesday May 21, 2014 @01:06PM (#7779361)
But if the reciever echoes "sho" (drunken "so") that would just be "sho" again wouldn't it?
Re:The greatest bug I never fixed (2010) by ajanuary on Wednesday May 21, 2014 @01:15PM (#7779415)
Server sends 'so'

Receiver receives 'sho'

Receiver sends back 'sho'

Sender receives 'sho', compares it to the 'so' it thought it sent, and correctly deduces something went wrong in the communication.

Re:The greatest bug I never fixed (2010) by netrus on Wednesday May 21, 2014 @01:00PM (#7779326)
But what if both are drunk?!
Re:The greatest bug I never fixed (2010) by ajanuary on Wednesday May 21, 2014 @01:14PM (#7779408)
If the drunk transformation is 's' -> 'sh'

Sender sends 's'

Receiver receives 'sh'

Receiver sends back 'sh'

Sender receives 'shh', compares it to the 's' it thought it sent, and correctly deduces something went wrong in the communication.

It is overzealous in that it would fail if the sender wasn't drunk but the receiver was.

Re:The greatest bug I never fixed (2010) by StefanKarpinski on Wednesday May 21, 2014 @12:34PM (#7779140)
Error correcting codes?
Re:The greatest bug I never fixed (2010) by ricree on Wednesday May 21, 2014 @02:44PM (#7779978)
If I'm remembering correctly, only certain characters get transformed. So maybe you could use Huffman coding to map the text into a safe character set before you sent it. (might still have to strip out unacceptable characters to get rid of the ...hic)
Re:The greatest bug I never fixed (2010) by Brandon0 on Wednesday May 21, 2014 @12:46PM (#7779211)
I would have either just trimmed the ... hic from the received text (if there was only one string causing problems), or maybe even better would be to use control codes to signal the beginning and end of the data.
Re:The greatest bug I never fixed (2010) by ryeguy on Wednesday May 21, 2014 @01:00PM (#7779330)
it looks like it actually transforms the message too, not just adds "..hic"
Re:The greatest bug I never fixed (2010) by tcgv on Wednesday May 21, 2014 @09:04PM (#7781604)
What about encoding messages with numbers, and then filtering the letters that are added to the message when you are drunk at the receiver side, just before decoding it, would that work?
Re:The greatest bug I never fixed (2010) by armada651 on Wednesday May 21, 2014 @05:57PM (#7781001)
Please let me know when you guys figure this one out. I always wanted to know the best way to flawlessly communicate with friends while drunk.