diff --git a/src/irc.clj b/src/irc.clj index 06aa7f0..2259b0b 100644 --- a/src/irc.clj +++ b/src/irc.clj @@ -9,9 +9,9 @@ (defn irc-callback [state config connection type & m] (let [{:keys [channel]} (:irc config) {:keys [nick text target]} type] - (when (= target channel) - (doseq [line (str/split-lines (dispatch-command state nick text))] - (irclj.core/message connection channel line))))) + (some->> (dispatch-command state nick text) + (str/split-lines) + (run! (partial irclj.core/message connection channel))))) (defn new-irc-connection [state config] (let [{:keys [server port name nick channel]} (:irc config)]