Skip to content

Commit

Permalink
Ignore users on the user-blacklist.
Browse files Browse the repository at this point in the history
  • Loading branch information
Raynes committed Aug 24, 2012
1 parent 5440c04 commit 85f3564
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/lazybot/plugins/github.clj
Expand Up @@ -5,7 +5,8 @@
[clojure.data.json :refer [read-json Read-JSON-From]]
[clojure.string :as s]
[tentacles.issues :refer [specific-issue]]
[useful.map :refer [update]])
[useful.map :refer [update]]
[clojure.pprint :refer [pprint]])
(:import java.net.InetAddress))

(def bots (atom {}))
Expand Down Expand Up @@ -108,7 +109,8 @@ specified in config.clj."

(:hook
:on-message
(fn [{:keys [message] :as com-m}]
(when-let [match (re-find issue-regex message)]
(when-let [message (issue-message (parse-issue match))]
(send-message com-m message))))))
(fn [{:keys [message nick bot com] :as com-m}]
(when-not ((get-in @bot [:config (:server @com) :user-blacklist]) nick)
(when-let [match (re-find issue-regex message)]
(when-let [message (issue-message (parse-issue match))]
(send-message com-m message)))))))

0 comments on commit 85f3564

Please sign in to comment.