support MOTD command
This commit is contained in:
parent
d340708d4f
commit
bdf31dac5b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue