public override void Execute() { User user = _persistance.GetUserFromIdent(_ident); if (!string.IsNullOrEmpty(user.Vhost)) { var vhostOperCommmand = VhostOperCommmand.SetVhost(_nick, user.Vhost); OperCommands.Add(vhostOperCommmand); } if (user.AutoJoin) { foreach (var group in user.Groups) { if (!string.IsNullOrEmpty(group.Channel)) { var sajoinOperCommmand = SajoinOperCommmand.SetSaJoin(_nick, group.Channel); OperCommands.Add(sajoinOperCommmand); if (group.GroupAdmins.Contains(user)) { var saModeOpsOperCommmand = SaModeOpsOperCommmand.SetSamode(_nick, group.Channel); OperCommands.Add(saModeOpsOperCommmand); } } } } }
public bool CheckPermissions() { var user = _persistance.GetUserFromIdent(Context.Ident); if (user != null) { IsOper = user.IsOper; } return(IsOper); }