From bdf31dac5bac265bf288e20397e7ec8ac5dcf036 Mon Sep 17 00:00:00 2001 From: tali Date: Mon, 8 Jan 2024 01:15:41 -0500 Subject: [PATCH] support MOTD command --- lib/server/connection.ml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/server/connection.ml b/lib/server/connection.ml index 4b4f34b..ccacf28 100644 --- a/lib/server/connection.ml +++ b/lib/server/connection.ml @@ -161,6 +161,7 @@ let on_msg t (msg : Irc.Msg.t) : unit = on_msg_user t username modestr realname | "QUIT", why -> on_msg_quit t why + | "MOTD", _ -> `motd | "PRIVMSG", tgt :: msg :: _ -> on_msg_privmsg t tgt msg | "PRIVMSG", [_] -> `notexttosend | "PRIVMSG", [] -> `norecipient @@ -173,6 +174,7 @@ let on_msg t (msg : Irc.Msg.t) : unit = | `ok -> () | `quit -> cleanup t | `welcome -> rpl_welcome t; rpl_motd t + | `motd -> rpl_motd t | `names (cp, ch, us) -> rpl_names t cp ch us | `tryagain -> rpl_tryagain t msg.command | `alreadyregistered -> err_alreadyregistered t