Access Gajim within Emacs

Here is some function to launch a gajim window from Emacs :

(defvar gajim-remote "/usr/bin/gajim-remote")
(defvar gajim-user-list ())

(defun my-gajim-get-list()
  (save-excursion
    (with-temp-buffer
      (call-process gajim-remote nil t nil "list_contacts")
      (goto-char (point-min))
      (while (re-search-forward "^jid[ ]*:[ ]*\\(.*\\)$" (point-max) t )
        (setq gajim-user-list (append gajim-user-list (list (match-string-no-properties 1)))))))
  gajim-user-list)

(defun my-gajim-talk()
  (interactive)
  (let* ((ff (if (not gajim-user-list)(my-gajim-get-list) gajim-user-list))
         (answer (completing-read "Jabber: " (mapcar (lambda (tt)(list tt)) ff))))
    (message answer)
    (start-process "*GAJIM*" nil gajim-remote "open_chat" answer)
    )
  )
(global-set-key '[(control x)(j)] 'my-gajim-talk)

If Emacs had a dbus support that would have been cool.

crypt(3) on unix maximal length

When i have a password comparaison function using crypt(3) i really should remember that the comparaison stop at the 7 bytes, because that stuff is weird for me :

In [1]: import crypt
In [2]: seed=’foo!bar’
In [3]: crypt.crypt(‘abcdefghaa123456681’, seed)
Out[3]: ‘foEoVhbk7ad7A’
In [4]: crypt.crypt(‘abcdefghpax;lalx;al’, seed)
Out[4]: ‘foEoVhbk7ad7A’
In [5]:

any stuff after the 6 char will always get ignored by the hash algorithm.