remove use of Irc.Mode.t
This commit is contained in:
parent
d17e573e41
commit
fbf9211b5f
|
@ -49,9 +49,11 @@ let attempt_to_register t =
|
||||||
begin match User.set_nick t.user nick ~router:t.router with
|
begin match User.set_nick t.user nick ~router:t.router with
|
||||||
| `nick_in_use -> `nicknameinuse nick
|
| `nick_in_use -> `nicknameinuse nick
|
||||||
| `nick_set ->
|
| `nick_set ->
|
||||||
let mode_str = Fmt.str "+%a" Irc.Mode.pp t.user.mode in
|
|
||||||
let mode_msg = Irc.Msg.make "MODE" [nick; mode_str] in
|
(* TODO: this sucks, fix it *)
|
||||||
|
let mode_msg = Irc.Msg.make "MODE" [nick; "+iw"] in
|
||||||
defer (fun () -> Router.relay mode_msg ~from:t.user `to_self);
|
defer (fun () -> Router.relay mode_msg ~from:t.user `to_self);
|
||||||
|
|
||||||
`welcome
|
`welcome
|
||||||
end
|
end
|
||||||
| _, _ -> `ok
|
| _, _ -> `ok
|
||||||
|
@ -187,11 +189,6 @@ let on_msg_quit t reason =
|
||||||
let srv_host = "irc.tali.software"
|
let srv_host = "irc.tali.software"
|
||||||
let srv_ver = "0.0.0"
|
let srv_ver = "0.0.0"
|
||||||
let srv_created = "Sun Jan 7 09:58:24 PM EST 2024"
|
let srv_created = "Sun Jan 7 09:58:24 PM EST 2024"
|
||||||
let srv_isupport = [
|
|
||||||
"CASEMAPPING=ascii";
|
|
||||||
"CHANTYPES=#";
|
|
||||||
"PREFIX=(ov)@+";
|
|
||||||
]
|
|
||||||
let srv_motd_lines = [
|
let srv_motd_lines = [
|
||||||
"MEOW MEOW MEOW MEOW MEOW";
|
"MEOW MEOW MEOW MEOW MEOW";
|
||||||
"meow meow meow meow meow";
|
"meow meow meow meow meow";
|
||||||
|
@ -207,12 +204,18 @@ let rpl_tryagain t cmd = rpl t "263" [cmd; "Please wait a while and try again."]
|
||||||
|
|
||||||
let rpl_welcome t =
|
let rpl_welcome t =
|
||||||
let who = Irc.Msg.prefix_string (User.prefix t.user) in
|
let who = Irc.Msg.prefix_string (User.prefix t.user) in
|
||||||
|
let isupport = [
|
||||||
|
"CASEMAPPING=ascii";
|
||||||
|
"CHANTYPES=#";
|
||||||
|
"CHANMODES=b,k,l,imstn";
|
||||||
|
"PREFIX=(ov)@+";
|
||||||
|
] in
|
||||||
begin
|
begin
|
||||||
rpl t "001" [Fmt.str "Welcome to the tali IRC network %s" who];
|
rpl t "001" [Fmt.str "Welcome to the tali IRC network %s" who];
|
||||||
rpl t "002" [Fmt.str "Your host is %s, running version %s" srv_host srv_ver];
|
rpl t "002" [Fmt.str "Your host is %s, running version %s" srv_host srv_ver];
|
||||||
rpl t "003" [Fmt.str "This server was created %s" srv_created];
|
rpl t "003" [Fmt.str "This server was created %s" srv_created];
|
||||||
rpl t "004" [srv_host; srv_ver; "aiwroOs"; "oinvm"];
|
rpl t "004" [srv_host; srv_ver; "iow"; "imnst"; "bklov"];
|
||||||
rpl t "005" (srv_isupport @ ["are supported by this server"]);
|
rpl t "005" (isupport @ ["are supported by this server"]);
|
||||||
end
|
end
|
||||||
|
|
||||||
let rpl_motd t =
|
let rpl_motd t =
|
||||||
|
|
|
@ -11,7 +11,6 @@ and user = {
|
||||||
mutable nick : Irc.name;
|
mutable nick : Irc.name;
|
||||||
mutable nick_key : string_ci;
|
mutable nick_key : string_ci;
|
||||||
mutable userinfo : Irc.userinfo option;
|
mutable userinfo : Irc.userinfo option;
|
||||||
mutable mode : Irc.Mode.t;
|
|
||||||
mutable membership : membership Dllist.t;
|
mutable membership : membership Dllist.t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +75,7 @@ module User = struct
|
||||||
nick = "*";
|
nick = "*";
|
||||||
nick_key = empty_string_ci;
|
nick_key = empty_string_ci;
|
||||||
userinfo = None;
|
userinfo = None;
|
||||||
mode = Irc.Mode.of_string "iw";
|
(* mode = "+iw"; *)
|
||||||
membership = Dllist.create ();
|
membership = Dllist.create ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue