add LINKS command
This commit is contained in:
parent
a4e98a10ae
commit
7d204b98b6
|
@ -735,6 +735,11 @@ let on_msg_lusers t =
|
|||
Fmt.str "Current global users %d, max %d" u m]);
|
||||
Ok ()
|
||||
|
||||
let on_msg_links t =
|
||||
let* _me = require_registered t in
|
||||
reply t ("365", ["End of /LINKS list"]);
|
||||
Ok ()
|
||||
|
||||
let quit t me ~reason =
|
||||
begin
|
||||
let msg = Msg.make "QUIT" [User.nick me; reason] ~always_trailing:true in
|
||||
|
@ -888,6 +893,7 @@ let dispatch t = function
|
|||
| "INFO", _ -> on_msg_info t
|
||||
| "TIME", _ -> on_msg_time t
|
||||
| "LUSERS", _ -> on_msg_lusers t
|
||||
| "LINKS", _ -> on_msg_links t
|
||||
| "HELP", args -> on_msg_help t (concat_args args)
|
||||
| "PING", args -> on_msg_ping t (concat_args args)
|
||||
| "PONG", args -> on_msg_pong t (concat_args args)
|
||||
|
@ -915,7 +921,6 @@ let dispatch t = function
|
|||
| ("CONNECT" | "KILL" | "REHASH" | "RESTART" | "STATS" | "SQUIT" | "WALLOPS"), _ ->
|
||||
Error noprivileges
|
||||
(* TODO: "LIST" *)
|
||||
(* TODO: "LINKS" *)
|
||||
(* TODO: "USERHOST" *)
|
||||
| cmd, _ ->
|
||||
Error (unknowncommand cmd)
|
||||
|
|
Loading…
Reference in New Issue