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]
|
||||
(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)]
|
||||
|
|
Loading…
Reference in New Issue