diff --git a/src/system.clj b/src/system.clj index b8cee5e..f882c20 100644 --- a/src/system.clj +++ b/src/system.clj @@ -34,7 +34,7 @@ (yaml/parse-stream datafile)) (catch Exception e nil))) -(defn start [system] +(defn start [_] (let [config (load-config "config.yaml") state (atom (load-state (:data-file config))) irc (irc/new-irc-connection state config)] @@ -52,8 +52,7 @@ (defn restart [system-var] (do - (alter-var-root system-var stop) - (alter-var-root system-var (constantly nil)) + (stop (deref system-var)) (alter-var-root system-var start))) (defn -main [& args]