Skip to main content

fortunaisk Plugin for Alliance Auth

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

FortunaISK

FortunaISK is a lottery module designed for Alliance Auth, enabling you to organize, manage, and track lottery participation and winners within your community. This module automates tedious tasks such as payments and verifications while providing an intuitive interface.

Features

  • Admin Dashboard: Provides an overview of global statistics, detected anomalies, and lottery management options.
  • Automatic or Manual Lottery Management: Simplifies the creation and management of recurring or one-time lotteries.
  • Ticket Purchases: Allows users to purchase tickets to participate in a lottery.
  • Automatic Payment Verification: Integration with allianceauth-corp-tools for automatic payment validation.
  • Anomaly Management: Identifies and facilitates the resolution of anomalies in transactions or participation.
  • Automatic Winner Selection: Automatically selects winners at the end of each lottery based on predefined criteria.
  • Periodic Tasks: Automates processes such as payment checks, status updates, and finalizing lotteries using Celery.
  • History Display: Lists previous winners with details of prizes awarded.
  • User-Friendly Interface: A clear interface to participate in and track ongoing or past lotteries.
  • Discord Integration: Sends notifications via Discord webhooks.
  • Winner Leaderboard: Highlights top winners with a podium based on their cumulative winnings.

Installation

  1. This app is built as a submodule of CorpTools, so please install this first.

  2. Install the app:

    pip install fortunaisk
    
  3. Add 'fortunaisk', to your INSTALLED_APPS in your project's local.py:

    INSTALLED_APPS += ["fortunaisk"]
    
  4. Run migrations, collect static files, and restart Auth:

    python manage.py migrate fortunaisk
    python manage.py collectstatic
    supervisorctl restart all
    
  5. Navigate to the following address to set up default cron tasks:

    AUTH_ADDRESS/fortunaisk/admin_create_tasks/
    
  6. Set up your permissions as documented below.

  7. Add characters and corp tokens as required.

  8. Optionally, set up update tasks if you want data to auto-update (see the Usage section).

Usage

Creating an Automatic Lottery

  1. Go to the admin interface and click "Create Automatic Lottery."

  2. Fill out the form with the following details:

    • Lottery Name: A unique name for the lottery.
    • Frequency: Set the recurrence (e.g., every month).
    • Ticket Price: Cost of each ticket in ISK.
    • Duration: Time period the lottery will remain open.
    • Number of Winners: Number of winners to be selected.
    • Prize Distribution: Allocate percentages to winners (total must be 100%).
    • Max Tickets per User: (Optional) Limit the number of tickets per user.
    • Payment Receiver: Select the corporation that will receive ticket payments.
  3. Submit the form to save the configuration.

Creating a Standard Lottery

  1. Go to the admin interface and click "Create a New Lottery."

  2. Fill out the form with details similar to an automatic lottery:

    • Ticket Price, Duration, Number of Winners, Prize Distribution, and Max Tickets per User.
    • Payment Receiver is also configurable.
  3. Submit the form to launch the lottery.

User Participation

  • Users can browse active lotteries and view details such as ticket prices and total pots.
  • Participation instructions (sending ISK via a specified corporation) are clearly displayed.
  • Once payments are made, the module automatically verifies transactions and validates entries.

Managing Winners

  • The module automatically selects winners at the end of each lottery.
  • Winners and their prizes are displayed in the history.
  • A dedicated interface allows admins to distribute prizes and mark winners as "rewarded."

Resolving Anomalies

  1. Access the admin dashboard and click "Total Anomalies."
  2. Review listed anomalies, including transaction details.
  3. Use the "Resolve" button to mark anomalies as resolved.

Lottery History

  • Displays past lotteries, including details on tickets sold, participants, and total pots.
  • Winners are listed with their respective rewards.

Permissions

The following table outlines the permissions available in FortunaISK and the corresponding actions they enable:

Permission Description
fortunaisk.admin Grants access to the admin dashboard for managing lotteries, anomalies, and winners.
fortunaisk.create_lottery Allows creating new standard or automatic lotteries.
fortunaisk.edit_lottery Allows editing the details of existing lotteries.
fortunaisk.terminate_lottery Enables termination of active lotteries prematurely.
fortunaisk.resolve_anomaly Allows resolving detected anomalies.
fortunaisk.distribute_prize Permits marking prizes as distributed to winners.

Ensure the appropriate permissions are assigned to users or groups to provide controlled access to the module's features.

Contributing

Contributions are welcome! To report an issue or propose a feature:

  1. Fork this repository.

  2. Create a branch for your feature or fix:

    git checkout -b feature/your-feature-name
    
  3. Submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.


Thank you for using FortunaISK! If you have any questions or feedback, feel free to open an issue or contact me directly.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fortunaisk-0.1.5.tar.gz (47.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fortunaisk-0.1.5-py3-none-any.whl (65.4 kB view details)

Uploaded Python 3

File details

Details for the file fortunaisk-0.1.5.tar.gz.

File metadata

  • Download URL: fortunaisk-0.1.5.tar.gz
  • Upload date:
  • Size: 47.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for fortunaisk-0.1.5.tar.gz
Algorithm Hash digest
SHA256 aaf87460d3d879caeb80cf93ec7fec39689ca4e47ca077cee8e33f60c7d59b18
MD5 c2def4b09db5bd47c97eca2ad5bd4def
BLAKE2b-256 7b048b4a7945fe89e08f4ab4bd0f6925d96bf59d4867dcc449003346355a3c4b

See more details on using hashes here.

File details

Details for the file fortunaisk-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: fortunaisk-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 65.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for fortunaisk-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 401a52acce7559be1b1b46ea12a82df4fc66e37d0550d1347bc38d33f17dc00a
MD5 afdca00009eb7cc40e23b8c7b80f6031
BLAKE2b-256 db724ae6343b09cca1e066390609307880f0a3adcfe4b2b7e70aa3c5cf52751d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page