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
|
on_msg_user t username modestr realname
|
||||||
| "QUIT", why ->
|
| "QUIT", why ->
|
||||||
on_msg_quit t why
|
on_msg_quit t why
|
||||||
|
| "MOTD", _ -> `motd
|
||||||
| "PRIVMSG", tgt :: msg :: _ ->
|
| "PRIVMSG", tgt :: msg :: _ ->
|
||||||
on_msg_privmsg t tgt msg
|
on_msg_privmsg t tgt msg
|
||||||
| "PRIVMSG", [_] -> `notexttosend | "PRIVMSG", [] -> `norecipient
|
| "PRIVMSG", [_] -> `notexttosend | "PRIVMSG", [] -> `norecipient
|
||||||
|
@ -173,6 +174,7 @@ let on_msg t (msg : Irc.Msg.t) : unit =
|
||||||
| `ok -> ()
|
| `ok -> ()
|
||||||
| `quit -> cleanup t
|
| `quit -> cleanup t
|
||||||
| `welcome -> rpl_welcome t; rpl_motd t
|
| `welcome -> rpl_welcome t; rpl_motd t
|
||||||
|
| `motd -> rpl_motd t
|
||||||
| `names (cp, ch, us) -> rpl_names t cp ch us
|
| `names (cp, ch, us) -> rpl_names t cp ch us
|
||||||
| `tryagain -> rpl_tryagain t msg.command
|
| `tryagain -> rpl_tryagain t msg.command
|
||||||
| `alreadyregistered -> err_alreadyregistered t
|
| `alreadyregistered -> err_alreadyregistered t
|
||||||
|
|
Loading…
Reference in New Issue