From a6a72ccf8d8de63a2d24df0d0627051fa8985efb Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sun, 12 Mar 2006 20:53:28 +0000 Subject: [PATCH] forbid resource when we add a contact. Fixes #1117 --- src/dialogs.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dialogs.py b/src/dialogs.py index c921535e4..148a4477f 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -403,6 +403,12 @@ _('Please fill in the data of the contact you want to add in account %s') %accou ErrorDialog(pritext, str(s)).get_response() return + # No resource in jid + if jid.find('/') >= 0: + pritext = _('Invalid User ID') + ErrorDialog(pritext, _('The user ID must not contain a resource.')).get_response() + return + # Check if jid is already in roster if jid in gajim.contacts.get_jid_list(self.account) and \ _('Not in Roster') not in \