anchor.diff:      (check-ballot-password ballot password)
       (setf (slot-value ballot 'state)    :open
             (slot-value ballot 'deadline) (absolute-deadline (ballot-deadline ballot)))
  -    (publish-ballot ballot)))
  -
  -;; | cancel ballot $ballot-id $password               |                        | Cancel a ballot.  We can cancel a ballot from the :editing or the :open state. |
  +    (publish-ballot ballot)
  +    (save-ballots)))
  +
  +;; | cancel ballot $ballot-id $password               |                        | Cancel a ballot.  We can cancel a ballot from the :editing or the :open state.
   (defun cancel-ballot (user-id password ballot-id)
     (let ((ballot (find-ballot-id ballot-id)))
       (check-ballot-owner ballot user-id)
       (check-ballot-state ballot '(:editing :open) 'cancel-ballot)
       (check-ballot-password ballot password)
       (setf (slot-value ballot 'state) :cancelled)
  -    (publish-ballot ballot)))
  -
  -;; | close ballot $ballot-id $password                 |                        | Close the ballot before the deadline. From the :opoen state.                                                |
  +    (publish-ballot ballot)
  +    (save-ballots)))
  +
  +;; | close ballot $ballot-id $password                 |                        | Close the ballot before the deadline. From the :opoen state.
   (defun close-ballot (user-id password ballot-id)
     (let ((ballot (find-ballot-id ballot-id)))
       (check-ballot-owner ballot user-id)
       (check-ballot-state ballot :open 'close-ballot)
       (check-ballot-password ballot password)
       (setf (slot-value ballot 'state) :closed)
  -    (publish-ballot ballot)))
  -
  -
  -;; | vote $ballot-id [choice] $choice-id              |                        | Cast or change a vote.  Only in :open state.                                              |
  -;; |                                                  |                        | If the same user votes several times, only the last vote is taken into account.           |
  +    (publish-ballot ballot)
  +    (save-ballots)))
  +
  +
  +;; | vote $ballot-id [choice] $choice-id              |                        | Cast or change a vote.  Only in :open state.
  +;; |                                                  |                        | If the same user votes several times, only the last vote is taken into account.
   (defun vote-choice (user-id ballot-id choice-id)
     (let* ((ballot (find-ballot-id ballot-id))
            (vote   (find-vote ballot user-id)))
  
positive.code:   (let ((*package* (load-time-value (find-package "COM.INFORMATIMAGO.SMALL-CL-PGMS.BOTVOT"))))
      (configure)
      (load-ballots)
      (with-simple-restart (quit "Quit")
        (catch :gazongues
          (with-retry (sleep (+ 10 (random 30)))
            (with-simple-restart (reconnect "Reconnect")
              (catch :petites-gazongues
                (unwind-protect
                     (progn
                       (setf *connection* (connect :nickname *nickname* :server *server*))
  
negative.code:     (if vote
          (error 'already-voted :user-id user-id :ballot-id ballot-id)
          ;; cast a new vote
          (progn
            (push (make-instance 'vote
                                :ballot-id ballot-id
                                :user-id user-id
                                :choice-id choice-id)
                  (slot-value ballot 'votes))
            (save-ballots)))))
  
  ;; | [ballot] results [of] [ballot] $ballot-id        | list of vote results   | in :editing state, we only display the ballot info (same as show ballot $ballot-id);
  ;; |                                                  |                        | in :open state, we only display the number of casted votes;
  ;; |                                                  |                        | in :closed state, we display the vote results.
  (defun show-ballot-results (user-id ballot-id)
    (let ((ballot (find-ballot-id ballot-id)))
      (ecase (ballot-state ballot)
  