From 4a2347acd71413c7edc2ab0f3a8d216dfab9c620 Mon Sep 17 00:00:00 2001 From: Michael Cornelius Date: Wed, 28 Aug 2013 11:18:58 -0500 Subject: [PATCH 1/2] Fix test. In 40458ce "parse-message" was renamed to "parse", causing test to fail. Applying rename in test makes test pass again. --- test/irclj/parser_test.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/irclj/parser_test.clj b/test/irclj/parser_test.clj index eb7ae06..eab8197 100644 --- a/test/irclj/parser_test.clj +++ b/test/irclj/parser_test.clj @@ -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", From e8526a6143522f9c079d7b6fd087a53594d8869c Mon Sep 17 00:00:00 2001 From: Michael Cornelius Date: Wed, 28 Aug 2013 14:23:08 -0500 Subject: [PATCH 2/2] Add LIST command. RFC 1459 4.2.6 --- src/irclj/core.clj | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/irclj/core.clj b/src/irclj/core.clj index a297cb2..2ee86ba 100644 --- a/src/irclj/core.clj +++ b/src/irclj/core.clj @@ -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."