                                         (format-client channel)
                                         room
                                         (or part-message nick)))
-             (remove-nick-from-room! nick room))
+             (remove-nick-from-room! nick room)
+             (run-hook 'part-hook channel room))
             (raise {:type :client-error
                     :code 442
                     :msg (format "%s :You're not on that channel" room)}))

    (if (not (empty? recipient))
      (if (not (nil? received-msg))
        (if (room-for-name recipient)
          (send-to-room-except recipient msg channel)
          (if-let [channel (channel-for-nick recipient)]
            (send-to-client* channel msg)
            (raise {:type :client-error
                    :code 401
                    :msg (format "%s :No such nick/channel" recipient)})))

                                           (format ":%s QUIT :Client Quit"
                                                   (format-client channel)))]
    (await chan-future-agent)
    (run-hook 'quit-hook channel quit-msg)
    (when-let [chan-future @chan-future-agent]
      (.addListener chan-future (ChannelFutureListener/CLOSE)))))

