diff -rNu gajim-0.11.4.orig/src/common/contacts.py gajim-0.11.4/src/common/contacts.py
--- gajim-0.11.4.orig/src/common/contacts.py	2007-12-02 17:03:18.000000000 +0100
+++ gajim-0.11.4/src/common/contacts.py	2007-12-30 12:49:19.000000000 +0100
@@ -393,6 +393,8 @@
 		jid2 = data2['jid']
 		account1 = data1['account']
 		account2 = data2['account']
+		server1 = jid1.split('@')[1]
+		server2 = jid2.split('@')[1]
 		contact1 = self.get_contact_with_highest_priority(account1, jid1)
 		contact2 = self.get_contact_with_highest_priority(account2, jid2)
 		show_list = ['not in roster', 'error', 'offline', 'invisible', 'dnd',
@@ -434,6 +436,11 @@
 			return 1
 		if show2 > show1:
 			return -1
+		if server1 == account1:
+			if server2 != account2:
+				return 1
+		elif server2 == account2:
+			return -1
 		if jid1 > jid2:
 			return 1
 		if jid2 > jid1:
