Reintroduces separate contexts for users, channels, connections (now split into sessions and connections) and user-channel associations. It builds which is as much assurance as I can give about the stability of this commit, but its also the bare minimum of what i like to commit sooooo A lot of things still need to be broadcast through events throughout the application in order to keep states consistent but we'll cross that bridge when we get to it. I really need to stop using that phrase thingy, I'm overusing it.
34 lines
907 B
C#
34 lines
907 B
C#
namespace SharpChat.Users;
|
|
|
|
/// <summary>
|
|
/// User Permissions.
|
|
/// THESE CAN CHANGE AT ANY TIME!!!!
|
|
/// If you want to store them or return permissions from another system, convert them!!!
|
|
/// </summary>
|
|
[Flags]
|
|
public enum UserPermissions : ulong {
|
|
SendMessage = 1ul,
|
|
DeleteOwnMessage = 1ul << 2,
|
|
DeleteAnyMessage = 1ul << 3,
|
|
EditOwnMessage = 1ul << 4,
|
|
EditAnyMessage = 1ul << 5,
|
|
SendBroadcast = 1ul << 6,
|
|
ViewLogs = 1ul << 7,
|
|
|
|
KickUser = 1ul << 10,
|
|
BanUser = 1ul << 11,
|
|
PardonUser = 1ul << 12,
|
|
PardonIPAddress = 1ul << 13,
|
|
ViewIPAddress = 1ul << 14,
|
|
ViewBanList = 1ul << 15,
|
|
|
|
CreateChannel = 1ul << 20,
|
|
SetChannelPermanent = 1ul << 21,
|
|
SetChannelPassword = 1ul << 22,
|
|
SetChannelMinimumRank = 1ul << 23,
|
|
DeleteChannel = 1ul << 24,
|
|
JoinAnyChannel = 1ul << 25,
|
|
|
|
SetOwnNickname = 1ul << 30,
|
|
SetOthersNickname = 1ul << 31,
|
|
}
|