[jdev] status bug in pyaim-t

Robert B Quattlebaum, Jr. darco at deepdarc.com
Sun Jun 19 18:14:52 CDT 2005


On Jun 14, 2005, at 1:42 AM, Eric Muehlstein wrote:
>>> I would try a hand at fixing this myself, but my python isn't too
>>> strong.
>>>
>>
>> Neither is mine--I'm fresh meat in terms of python programming. But
>> that's what is so great about python; it is very easy to work with
>> code even if you are still trying to learn the ins-and-outs of the
>> language. Give it a try--you might be surprised by how productive
>> you'll be right out off the bat.
>>
>
> I'm so deep into PHP and C++ right now that python is making my brain
> hurt.  I assume the relevant code is from the oscar.py file:
>
> def setAway(self, away = None):
>         """
>         set the away message, or return (if away == None)
>         """
>         self.awayMessage = away
>         tlvs = TLV(3,'text/aolrtf; charset="us-ascii"') + \
>                TLV(4,away or '')
>         self.sendSNACnr(0x02, 0x04, tlvs)
>
> It'd be nice if I could see what you did.  It would save me a good  
> deal of headache.

Here ya go:

> ===================================================================
> --- src/legacy/glue.py  (revision 115)
> +++ src/legacy/glue.py  (working copy)
> @@ -166,6 +166,8 @@
>         def setStatus(self, show, friendly):
>                 debug.log("LegacyConnection: setStatus %s %s" %  
> (show, friendly))
> +               if (show=="away" and  not friendly ):
> +                       friendly="Away"
>                 self.savedShow = show
>                 self.savedFriendly = friendly

As I said, easy fix--just add two lines. Sorry I didn't get around to  
posting this earlier. :/

__________________
Robert Quattlebaum
Mobile: +1(425)443-6785
eMail:  darco at deepdarc.com
Jabber: darco at deepdarc.com
MSN:    darco at deepdarc.com
AIM:    rquat2
yahoo:  robert_quattlebaum
ICQ:    1454810






More information about the JDev mailing list