diff --git a/src/roster_window.py b/src/roster_window.py index 4f682310a..0e83b1c30 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -688,6 +688,13 @@ class RosterWindow: def on_remove_agent(self, widget, contact, account): '''When an agent is requested to log in or off''' + if gajim.config.get_per('accounts', account, 'hostname') == contact.jid: + # We remove the server contact + # remove it from treeview + self.remove_contact(contact, account) + del gajim.contacts[account][contact.jid] + return + window = dialogs.ConfirmationDialog(_('Transport "%s" will be removed') % contact.jid, _('You will no longer be able to send and receive messages to contacts from %s.' % contact.jid)) if window.get_response() == gtk.RESPONSE_OK: gajim.connections[account].unsubscribe_agent(contact.jid + '/' \