Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/irclj/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@
(connection/write-irc-line irc "KICK" channel user
(when message (connection/end message))))

(defn list
"Request list of channels and topics."
[irc & channels]
(connection/write-irc-line irc "LIST" (clojure.string/join "," channels)))

;; We fire our raw-log callback for the lines we read from IRC as well.
(defn- process
"Prepare and process a line from IRC."
Expand Down
4 changes: 2 additions & 2 deletions test/irclj/parser_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
clojure.test))

(deftest parser-test
(is (= (parse-message ":amalloy!~amalloy@li231-96.members.linode.com PRIVMSG #4clojure")
(is (= (parse ":amalloy!~amalloy@li231-96.members.linode.com PRIVMSG #4clojure")
{:command "PRIVMSG",
:params ["#4clojure"],
:raw ":amalloy!~amalloy@li231-96.members.linode.com PRIVMSG #4clojure",
:host "li231-96.members.linode.com",
:user "~amalloy",
:nick "amalloy"}))
(is (= (parse-message ":amalloy!~amalloy@li231-96.members.linode.com PRIVMSG #4clojure :ckirkendall: would you mind using amalloy on irc, rather than alan? it's nice to get notifications from my irc client")
(is (= (parse ":amalloy!~amalloy@li231-96.members.linode.com PRIVMSG #4clojure :ckirkendall: would you mind using amalloy on irc, rather than alan? it's nice to get notifications from my irc client")
{:command "PRIVMSG",
:params ["#4clojure" "ckirkendall: would you mind using amalloy on irc, rather than alan? it's nice to get notifications from my irc client"],
:raw ":amalloy!~amalloy@li231-96.members.linode.com PRIVMSG #4clojure :ckirkendall: would you mind using amalloy on irc, rather than alan? it's nice to get notifications from my irc client",
Expand Down