diff --git a/src/irc.clj b/src/irc.clj index 5275ab2..0036ca9 100644 --- a/src/irc.clj +++ b/src/irc.clj @@ -2,15 +2,16 @@ ;; SPDX-FileCopyrightText: 2022 Sebastian Crane (ns irc - (:require [bot :refer :all] + (:require [clojure.string :as str] + [bot :refer :all] [irclj.core])) (defn irc-callback [state config connection type & m] (let [{:keys [channel]} (:irc config) {:keys [nick text target]} type] - (irclj.core/message connection channel - (when (= target channel) - (dispatch-command state nick text))))) + (when (= target channel) + (doseq [line (str/split-lines (dispatch-command state nick text))] + (irclj.core/message connection channel line))))) (defn new-irc-connection [state config] (let [{:keys [server port name nick channel]} (:irc config)]