forked from LibreGaming/matchbot
Fix exception when dispatch-command returns nil
Signed-off-by: Sebastian Crane <seabass-labrax@gmx.com>
This commit is contained in:
parent
8502f6980d
commit
293fa41d3b
|
@ -9,9 +9,9 @@
|
||||||
(defn irc-callback [state config connection type & m]
|
(defn irc-callback [state config connection type & m]
|
||||||
(let [{:keys [channel]} (:irc config)
|
(let [{:keys [channel]} (:irc config)
|
||||||
{:keys [nick text target]} type]
|
{:keys [nick text target]} type]
|
||||||
(when (= target channel)
|
(some->> (dispatch-command state nick text)
|
||||||
(doseq [line (str/split-lines (dispatch-command state nick text))]
|
(str/split-lines)
|
||||||
(irclj.core/message connection channel line)))))
|
(run! (partial irclj.core/message connection channel)))))
|
||||||
|
|
||||||
(defn new-irc-connection [state config]
|
(defn new-irc-connection [state config]
|
||||||
(let [{:keys [server port name nick channel]} (:irc config)]
|
(let [{:keys [server port name nick channel]} (:irc config)]
|
||||||
|
|
Loading…
Reference in New Issue