-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from privt00/1.5.2
1.5.2
- Loading branch information
Showing
234 changed files
with
63,628 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# TFC-Plex License | ||
Version 2.1, December 26, 2023 | ||
|
||
Copyright (c) 2023, TFC-Hosting | ||
|
||
## Definitions | ||
a. "Software" refers to the TFC-Plex program. | ||
b. "Host" refers to the server or system on which the Software is executed. | ||
c. "Modification" refers to any alteration, adaptation, or derivative work of the Software. | ||
|
||
## License Grant | ||
a. This Software is subject to the terms of the Apache 2.0 License (https://www.apache.org/licenses/LICENSE-2.0), with the following modifications: | ||
|
||
## Permitted Actions | ||
a. The Software may only be used for personal purposes and for internal use within companies. Sale, publication, merging, or sublicensing remains prohibited. | ||
|
||
## Limitations | ||
a. Changes to the TFC-Plex Software's footer are prohibited. Violation of this prohibition may result in the suspension of the Host. | ||
b. The TFC-Plex API may not be altered without explicit permission. Permission requests can be made through the Discord server (https://discord.gg/MCfBtSWPE8). | ||
|
||
## Host Verification | ||
a. A Host may be considered "verified" if it adheres to these license terms and is deemed 100% legitimate. | ||
|
||
## Relationship to Pterodactyl Panel | ||
a. The TFC-Plex Software is a Pterodactyl Panel Shop and is not directly affiliated with the Pterodactyl Panel. Any references to the Pterodactyl Panel are for contextualization purposes only and should not be construed as an official connection. | ||
|
||
## Disclaimer | ||
a. The TFC-Plex Software is provided "as is," without any warranty or guarantee. The author is not liable for any damages arising from the use of the TFC-Plex Software. | ||
|
||
This license has been created to address the author's concerns regarding changes to the TFC-Plex Software's footer, API, and Host verification. It is recommended to carefully read and understand this license before using, modifying, or distributing the TFC-Plex Software. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# tfc-plex | ||
|
||
 | ||
<p align="center" dir="auto">Trusted by 19 host and 2843 users.</p> | ||
<p align="center"> | ||
<a><img src="https://img.shields.io/github/downloads/privt00/tfc-plex/total?color=blue&label=v1.5.0 Downloads"/></a> | ||
<a href="https://discord.gg/BXmzHS9DRA"><img src="https://img.shields.io/discord/1175441775972860076?color=blue&label=Discord&logo=tfc-plex&logoColor=blue" alt="discord" /></a> | ||
<a href="https://docs.tfc-plex.de/"><img alt="Docs" src="https://img.shields.io/website?down_color=lightred&down_message=Offline&label=Docs&up_color=blue&up_message=Online&url=https://docs.tfc-plex.de/"></a> | ||
<a href="https://tfc-plex.de"><img alt="Website" src="https://img.shields.io/website?down_color=lightred&down_message=Offline&label=Website&up_color=blue&up_message=Online&url=https://tfc-plex.de"></a> | ||
<a href="https://dash.tfc-hosting.de"><img alt="Demo" src="https://img.shields.io/website?down_color=lightred&down_message=Offline&label=Demo&up_color=blue&up_message=Online&url=https://demo.tfc-plex.de"></a> | ||
<a href="https://github.com/privt00/tfc-plex/stargazers"><img src="https://img.shields.io/github/stars/privt00/tfc-plex?label=Stars %E2%AD%90" height="20"/></a> | ||
</p> | ||
|
||
|
||
|
||
|
||
## Features | ||
|
||
|
||
|
||
--- | ||
|
||
## 👀 Preview | ||
TFC-plex Demo: https://dash.tfc-hosting.de/ | ||
|
||
## 👀 Our Docs | ||
https://docs.tfc-plex.de/ | ||
|
||
|
||
|
||
Dashboard (v1.5.0): | ||
 | ||
|
||
Server (v1.5.0): | ||
 | ||
|
||
User Settings (v1.0): | ||
 | ||
|
||
Theme Switcher (v1.5.0): | ||
 | ||
|
||
|
||
--- | ||
|
||
## 📝 Authors | ||
- [**Privt**](https://github.com/privt00) | ||
|
||
|
||
|
||
|
||
--- | ||
|
||
# Cangelog | ||
|
||
|Date|Version|Short Description|Long Description| | ||
|---|---|---|---| | ||
|2023/12/24|v1.0|First Release|| | ||
|
||
© 2023-2024 TFC-Plex by privt00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
const indexjs = require("../index.js"); | ||
const fs = require("fs"); | ||
const moment = require("moment"); | ||
|
||
module.exports.load = async function (app, db) { | ||
app.get("/claim", async (req, res) => { | ||
if (!req.session.pterodactyl) return res.redirect("/login"); | ||
|
||
let theme = indexjs.get(req); | ||
|
||
// Check if claiming is enabled in settings | ||
let settings = JSON.parse(fs.readFileSync("./settings.json").toString()); | ||
if (!settings.claiming.enabled) { | ||
return res.send(`Claiming is currently disabled. <a href='/dashboard?alert=claimtoosoon'>go back to dashboard</a>`); | ||
} | ||
|
||
// Check if the user has already claimed coins on the current day | ||
let lastClaimDate = await db.get("lastClaimDate-" + req.session.userinfo.id) || null; | ||
let currentDate = moment().format("YYYY-MM-DD"); | ||
|
||
if (lastClaimDate === currentDate) { | ||
return res.send(`You have already claimed your coins today. <a href='/dashboard?alert=claimtoosoon'>go back to dashboard</a>`); | ||
} | ||
|
||
// Update last claim date for the user | ||
await db.set("lastClaimDate-" + req.session.userinfo.id, currentDate); | ||
|
||
// ... Rest of your existing code | ||
|
||
// Award coins for the claim | ||
let coinsPerClaim = settings.claiming.coinsPerClaim || 20; | ||
let coins = await db.get("coins-" + req.session.userinfo.id) || 0; | ||
coins = coins + coinsPerClaim; | ||
await db.set("coins-" + req.session.userinfo.id, coins); | ||
|
||
res.send(`You have successfully claimed ${coinsPerClaim} coins. <a href='/dashboard?alert=claim'>go back to dashboard</a>`); | ||
}); | ||
}; |
Oops, something went wrong.