diff options
author | Yann Leboulanger <asterix@lagaule.org> | 2004-03-31 05:09:07 +0400 |
---|---|---|
committer | Yann Leboulanger <asterix@lagaule.org> | 2004-03-31 05:09:07 +0400 |
commit | f366cd3db6af6af4a6f9f1d52ad2108cadc5e172 (patch) | |
tree | ffe2738e76685e2030cbc06e8f079eaf38639b0b /core | |
parent | 96d9ac8e2e100dd4ef7fb61abaf3cacc7fcaa770 (diff) |
handle error status (need an error icon)
Diffstat (limited to 'core')
-rw-r--r-- | core/core.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/core.py b/core/core.py index d75c06d0d..70e6d1d49 100644 --- a/core/core.py +++ b/core/core.py @@ -147,10 +147,9 @@ class GajimCore: self.hub.sendPlugin('UNSUBSCRIBED', self.connexions[con], \ prs.getFrom().getBasic()) elif type == 'error': - print "\n\n******** ERROR *******" errmsg = prs._node.kids[0].getData() self.hub.sendPlugin('NOTIFY', self.connexions[con], \ - (prs.getFrom().getBasic(), 'offline', errmsg, \ + (prs.getFrom().getBasic(), 'error', errmsg, \ prs.getFrom().getResource())) # END presenceCB @@ -160,6 +159,7 @@ class GajimCore: if self.connected[self.connexions[con]] == 1: self.connected[self.connexions[con]] = 0 con.disconnect() + del self.connexions[con] self.hub.sendPlugin('STATUS', self.connexions[con], 'offline') # END disconenctedCB @@ -175,7 +175,6 @@ class GajimCore: connection=common.xmlstream.TCP, port=5222) #debug = [common.jabber.DBG_ALWAYS], log = sys.stderr, \ #connection=common.xmlstream.TCP_SSL, port=5223) - self.connexions[con] = account try: con.connect() except IOError, e: @@ -206,6 +205,7 @@ class GajimCore: self.hub.sendPlugin('ROSTER', account, roster) con.sendInitPresence() self.hub.sendPlugin('STATUS', account, 'online') + self.connexions[con] = account self.connected[account] = 1 return con else: |