Show
Ignore:
Timestamp:
05/09/08 14:35:25 (4 months ago)
Author:
js
Message:

Added OTR support.
Work done by Kjell Braden <fnord@…>.
Some fixes done by me.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/roster_window.py

    r9600 r9602  
    17721772                        elif gajim.sleeper_state[account] not in ('autoaway', 'autoxa'): 
    17731773                                gajim.sleeper_state[account] = 'off' 
     1774 
     1775                        if gajim.otr_module: 
     1776                                # disconnect from ENCRYPTED OTR contexts when going 
     1777                                # offline/invisible 
     1778                                if status == 'offline' or status == 'invisible': 
     1779                                        ctx = gajim.otr_userstates[account].context_root 
     1780                                        while ctx is not None: 
     1781                                                if ctx.msgstate == gajim.otr_module.OTRL_MSGSTATE_ENCRYPTED: 
     1782                                                        disconnected = True 
     1783                                                        gajim.otr_module.otrl_message_disconnect(gajim.otr_userstates[account], 
     1784                                                                        (gajim.otr_ui_ops, 
     1785                                                                        {'account':account,'urgent':True}), ctx.accountname, 
     1786                                                                        ctx.protocol, ctx.username) 
     1787                                                ctx = ctx.next 
    17741788                if to: 
    17751789                        gajim.connections[account].send_custom_status(status, txt, to)