Source

messageme-clj / src / messageme / commands.clj

Full commit
(ns messageme.commands
  (:use messageme.core))

(defn connect [arg-str]
  (do-display-unread arg-str)
  (do-connect-user arg-str))

(defn disconnect [arg-str]
  (do-disconnect-user arg-str))

(defn send [arg-str]
  (let [[sender recipient body] (seq (.split arg-str " " 3))
        stripped-body (.replace body "'" "")]
    (send-message sender recipient stripped-body)))

(defn inbox [arg-str]
  (do-display-inbox arg-str))

(defn exit []
  (java.lang.System/exit 0))