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