Opened 10 years ago

Closed 11 months ago

#2943 enhancement closed wontfix (wontfix)

Adding status message (aka available message) support to

Reported by: venom087 Owned by:
Priority: normal Milestone:
Component: words Keywords:
Cc: Branch:


I've been using Twisted Words to write an AIM bot using the oscar protocol. I needed to be able to retrieve users' status messages so I added that functionality to It's just three extra lines of code. The following is a patch with my changes:

Index: /words/protocols/
--- /words/protocols/	(revision 22046)
+++ /words/protocols/	(working copy)
@@ -104,6 +104,7 @@
         self.warning = warn
         self.flags = []
         self.caps = []
+        self.statusMessage = ''
         for k,v in tlvs.items():
             if k == 1: # user flags
@@ -161,6 +162,8 @@
                 self.sessionLength = struct.unpack('!L',v)[0]
             elif k == 16: # session length (aol)
                 self.sessionLength = struct.unpack('!L',v)[0]
+            elif k == 29: # status message (aim)
+                self.statusMessage = v[26:len(v)-19]
             elif k == 30: # no idea

Change History (5)

comment:1 Changed 10 years ago by Jean-Paul Calderone

Owner: changed from Jean-Paul Calderone to venom087

Can you add a unit test for this, too? It would help me understand parts of that patch, such as the magical 26 and 19.

comment:2 in reply to:  1 Changed 10 years ago by venom087

Replying to exarkun:

magical 26 and 19

I know next to nothing about this protocol. On a hunch I printed the tlvs array passed to the OSCARUser constructor and noticed that item 29 contained the status message, with 26 mysterious characters before it and 19 mysterious characters after it. Unfortunately I can't tell you anything more other than that it's been working for me so far, including for empty status messages.

comment:3 Changed 10 years ago by venom087

Owner: changed from venom087 to Jean-Paul Calderone

comment:4 Changed 7 years ago by <automation>

Owner: Jean-Paul Calderone deleted

comment:5 Changed 11 months ago by Craig Rodrigues

Resolution: wontfix
Status: newclosed

oscar was removed in ticket:9024

Note: See TracTickets for help on using tickets.