add mode field to user

This commit is contained in:
tali 2024-01-14 12:24:52 -05:00
parent de6ff7abf6
commit 65fdddaac6
1 changed files with 3 additions and 1 deletions

View File

@ -8,6 +8,7 @@ type t = {
and user = { and user = {
outbox : Outbox.t; outbox : Outbox.t;
userinfo : Irc.userinfo; userinfo : Irc.userinfo;
mutable mode : Irc.Mode.Set.t;
mutable nick : Irc.name; mutable nick : Irc.name;
mutable nick_key : string_ci; mutable nick_key : string_ci;
mutable membership : membership Dllist.t; mutable membership : membership Dllist.t;
@ -71,12 +72,13 @@ module User = struct
userinfo; userinfo;
nick = "*"; nick = "*";
nick_key = empty_string_ci; nick_key = empty_string_ci;
(* mode = "+iw"; *) mode = Irc.Mode.Set.of_list [`i; `w];
membership = Dllist.create (); membership = Dllist.create ();
} }
let outbox t = t.outbox let outbox t = t.outbox
let nick t = t.nick let nick t = t.nick
let mode t = t.mode
let prefix = user_prefix let prefix = user_prefix
(* let is_registered t = t.nick_key <> empty_string_ci *) (* let is_registered t = t.nick_key <> empty_string_ci *)