Skip to content
Browse files

add MOTD command which always claims there's no MOTD

  • Loading branch information...
1 parent 7ba4238 commit 6b1f2ea76ac1e6ddea375256c6068857e32e788f @danlarkin danlarkin committed Dec 4, 2010
Showing with 8 additions and 1 deletion.
  1. +5 −1 src/subrosa/client.clj
  2. +3 −0 src/subrosa/commands.clj
View
6 src/subrosa/client.clj
@@ -94,6 +94,9 @@
(hostname)
(:version server))))
+(defn send-motd [channel]
+ (send-to-client channel 422 ":MOTD File is missing"))
+
(defn get-required-authentication-steps []
(if (config :password)
#{"NICK" "USER" "PASS"}
@@ -106,7 +109,8 @@
(when (= (:pending? user) (get-required-authentication-steps))
(alter db remove-tuple :user user)
(alter db add-tuple :user (assoc user :pending? nil))
- (send-welcome channel))
+ (send-welcome channel)
+ (send-motd channel))
(raise {:type :protocol-error
:disconnect true
:msg ":Bad Password"})))))
View
3 src/subrosa/commands.clj
@@ -287,3 +287,6 @@
(raise {:type :client-error
:code 461
:msg "PART :Not enough parameters"})))))
+
+(defcommand motd [channel args]
+ (send-motd channel))

0 comments on commit 6b1f2ea

Please sign in to comment.
Something went wrong with that request. Please try again.