# HG changeset patch # User Steve Losh # Date 1314396733 14400 # Node ID a587910b3c7d88396ac627b4901ef010c193da35 # Parent 7aa6da5b1d8bc4f9b6e88bfc02f36b69af03747e Disconnect nicely. diff -r 7aa6da5b1d8b -r a587910b3c7d src/clojurecraft/core.clj --- a/src/clojurecraft/core.clj Fri Aug 26 18:09:25 2011 -0400 +++ b/src/clojurecraft/core.clj Fri Aug 26 18:12:13 2011 -0400 @@ -89,7 +89,8 @@ (let [packet (.poll outqueue 1 TimeUnit/SECONDS)] (when packet (let [[packet-type, payload] packet] - (write-packet bot packet-type payload)))))) + (write-packet bot packet-type payload))))) + (write-packet bot :disconnectkick {:reason "Bye!"})) (println "done - output handler") (println "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"))