add line to help remind me to add validation
This commit is contained in:
parent
3658be9fe4
commit
130f79163d
|
@ -3,6 +3,8 @@ open Result_syntax
|
|||
|
||||
include (val Logging.sublogs logger "Connection")
|
||||
|
||||
let _todo_validation_please x = x
|
||||
|
||||
type t = {
|
||||
router : Router.t;
|
||||
server_info : Server_info.t;
|
||||
|
@ -158,6 +160,8 @@ let on_get_chan_mode chan _me =
|
|||
| None -> []
|
||||
end;
|
||||
|
||||
_todo_validation_please [];
|
||||
|
||||
(* TODO: only display key if priveledged enough to see it *)
|
||||
begin match Chan.key chan with
|
||||
| Some key -> ["324", [Chan.name chan; "+k"; key]]
|
||||
|
@ -230,6 +234,7 @@ let on_msg_privmsg t name txt =
|
|||
(* TODO: check if channel is +n and user is not a member *)
|
||||
(* TODO: check if channel is +m and user is not priviledged *)
|
||||
(* TODO: check if channel is +b <user> *)
|
||||
_todo_validation_please ();
|
||||
let name, dst =
|
||||
match tgt with
|
||||
| `chan c -> Chan.name c, [`to_chan c]
|
||||
|
@ -247,6 +252,7 @@ let list_names t chan =
|
|||
else "="
|
||||
in
|
||||
(* TODO: dont list users who are +i if you are not a member w/ them *)
|
||||
_todo_validation_please ();
|
||||
(* TODO: user membership prefix (@/+) *)
|
||||
let mems = List.map User.nick (Chan.members chan) in
|
||||
begin
|
||||
|
@ -266,6 +272,7 @@ let on_msg_names t name =
|
|||
Error (nosuchchannel name)
|
||||
in
|
||||
(* TODO: check if channel is +s and user not member of channel *)
|
||||
_todo_validation_please ();
|
||||
list_names t chan;
|
||||
Ok ()
|
||||
|
||||
|
@ -294,10 +301,12 @@ let on_msg_topic t name args =
|
|||
match args with
|
||||
| [] ->
|
||||
(* TODO: if +s then don't send topic to non-members *)
|
||||
_todo_validation_please ();
|
||||
get_topic t chan;
|
||||
Ok ()
|
||||
| args ->
|
||||
(* TODO: if +t then only allow +o to set topic *)
|
||||
_todo_validation_please ();
|
||||
let topic = String.concat " " args in
|
||||
let msg = Msg.make "TOPIC" [Chan.name chan; topic] ~always_trailing:true in
|
||||
Router.relay msg ~from:me [`to_chan chan; `to_self];
|
||||
|
@ -306,6 +315,7 @@ let on_msg_topic t name args =
|
|||
|
||||
let join t user chan =
|
||||
(* TODO: check channel mode +k, +l *)
|
||||
_todo_validation_please ();
|
||||
let msg = Msg.make "JOIN" [Chan.name chan] in
|
||||
Router.relay msg ~from:user [`to_chan chan; `to_self];
|
||||
Router.join chan user;
|
||||
|
|
Loading…
Reference in New Issue