OSCAR chatReceiveMessage being passed bad data in the message field
| Newsgroups | gmane.comp.python.twisted.bugs |
|---|---|
| Message-ID | <[email protected]> |
New submission from Garnett <None>:
I've been working on a chatbot for AOL Instant Messenger. However, I've run into a problem while trying to get Twisted to work as the backend library for this. I've set up a handler for chatReceiveMessage so that when the bot connects to a chat room it can respond to the messages that occur there. When it gets called, though, it just gets five garbage characters which seem to be affected only by the length of the incoming chat message. Further examination reveals that oscar_0E_06 (the function that calls chatReceiveMessage), after unpacking the TLVs of the message, ends up with this dictionary:
{1: '\x00D\x00\x02\x00', 2165: 'ascii\x00\x03\x00\x02en\x00\x01\x00.<HTML>The handler never sees this text.</HTML>'}
It then sends entry 1 (our aforementioned five incomprehensible characters), leaving the actual message text inside a garbled block of data at entry 2165.
I am on a Gentoo virtual machine running version 8.2 of twisted and twisted-words. My script is based heavily on the example script "oscardemo.py", which exhibits the same failure on this machine. Contact me at [email protected] if you need any more info to reproduce and/or track down this bug.
Thanks for your time. :)
----------
Type : defect
Component: words
Keywords :
Priority : normal
Nosy :
----------
http://twistedmatrix.com/trac/ticket/3963