we now catch all errors and send them to the gc if it's open

This commit is contained in:
Yann Leboulanger 2005-05-11 10:05:43 +00:00
parent fa183bae5d
commit 225ca870f1
1 changed files with 1 additions and 24 deletions

View File

@ -259,32 +259,9 @@ class Connection:
gajim.log.debug('we are now unsubscribed to %s' % who) gajim.log.debug('we are now unsubscribed to %s' % who)
self.dispatch('UNSUBSCRIBED', prs.getFrom().getStripped()) self.dispatch('UNSUBSCRIBED', prs.getFrom().getStripped())
elif ptype == 'error': elif ptype == 'error':
# Error stuff differs in xmpppy. So this part may require more adapting
errmsg = prs.getError() errmsg = prs.getError()
errcode = prs.getErrorCode() errcode = prs.getErrorCode()
if errcode == '400': #Bad Request: JID Malformed or Private message when not allowed if errcode == '409': #conflict : Nick Conflict
pass
elif errcode == '401': #No Password Provided
pass
elif errcode == '403': #forbidden : User is Banned
# Unauthorized Subject Change
# Attempt by Mere Member to Invite Others to a Members-Only Room
# Configuration Access to Non-Owner
# Attempt by Non-Owner to Modify Owner List
# Attempt by Non-Owner to Modify Admin List
# Destroy Request Submitted by Non-Owner
pass
elif errcode == '404': #item not found : Room Does Not Exist
pass
elif errcode == '405': #Not allowed : Attempt to Kick Moderator, Admin, or Owner
# Attempt to Ban an Admin or Owner
# Attempt to Revoke Voice from an Admin, Owner, or User with a Higher Affiliation
# Attempt to Revoke Moderator Privileges from an Admin or Owner
pass
elif errcode == '407': #registration required : User Is Not on Member List
#
pass
elif errcode == '409': #conflict : Nick Conflict
self.dispatch('ERROR', errmsg) self.dispatch('ERROR', errmsg)
else: else:
self.dispatch('NOTIFY', (prs.getFrom().getStripped(), 'error', \ self.dispatch('NOTIFY', (prs.getFrom().getStripped(), 'error', \