Code Monkey home page Code Monkey logo

tsq-plugin-framework's People

Contributors

dependabot[bot] avatar profiluefter avatar taxset avatar varchar42 avatar vortexdatanet avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

toothlesscz

tsq-plugin-framework's Issues

Add a EULA

If the user tries to run the framework without having accepted the eula the framework should instantly exit and inform him about that issue.

The eula on the other hand should inform him that by accepting it, he/she agrees to the sending of information about his/her framework instance.

Add statistics collector

This should send data to the VortexdataNET database. The following data should be collected:

Startup: The framework should send a ping informing VortexdataNET services that a new launch of the framework should be registered. -> Will be displayed on project website as "Framework Startups"

PluginLoad: Should send plugin statistics like plugin names and total plugin count to VortexdataNET. -> Might be displayed on the marketplace.

First-Run: Should send the first-run stat to the database. -> Will be displayed on project website as Total Installs.

Crash: Should send a stack trace and some parts of logs from the frameworks environment. Used to locate bugs.

Rework plugin system

Rework the plugin system and add a plugin config which is named "plugin.yml" (this file is placed is the jar root). It must support the following required attributes:

main: net.vortexdata.tsqpf-plugin-welcomemessage.Main
name: WelcomeMessage
version: 1.0.0
authors: [Someone, Anotherone]
publisher: VortexdataNET
dependencies: [PrivateChannel]
loadbefore: [PrivateChannel]
usage: "Syntax: !hello [world|kitty]"

Rework Framework class and optimize

As of now, the framework class is bloated with variables, methods and generally is very cluttered, making it harder to maintain and develop.

Rework session system for remote shell and integrated terminal

Is your feature request related to a problem? Please describe.
As of now, the session system is just a sloppy boolean controlled while loop that's only compatible with the local terminal and not with the remote shell.

Describe the solution you'd like
A new system supporting real sessions both locally and remotely. This system should also frequently update session user info to ensure that group changes to a user who's currently logged in (e.g. from Administrator to Gues) take immediate effect and prevents exploitation of admin commands by guest users.

registerChatCommand() does not register command

Bug Description
Plugin commands registered via the registerChatCommand() method are not being registered and activated.

To Reproduce
Steps to reproduce the behavior:

  1. Create a plugin that registers a chat command.
  2. Connect to a Teamspeak server running the plugin.
  3. Try to run the command.
  4. The framework will return a "Command not found." response.

Expected behavior
Run the registerd command.

Logs or Screenshots
N/A

Windows:

  • Windows Version: 1809
  • Java Version: 11
  • Framework Version: 2.0.0 Mint preview

Disable activation of heartbeat and remote shell

Remote shell and heartbeat ports should stay disabled and should not be able to be activated (unless using "-dev" start parameter). If the user tries to activate it, there should be a warning logged to the console.

[Framework] Check for special characters in adduser command

Describe the bug
If you put special characters, like the ';' separator used, in the username in the adduser command, you'll get a NullPointerException. I'm not saying that this is an problem(a person that want's to do this deserves an error), but it could be handled better.

To Reproduce
Steps to reproduce the behavior:

  1. Run the software and get it to a working state
  2. Run the adduser command
  3. Enter an username with a ';' in it. e.g. admin;something
  4. Enter a password twice
  5. Try to login with the account created. e.g admin

Expected behavior
The adduser command should either fail when given a special character or the character should be escaped.

Logs or Screenshots
Exception in thread "Thread-0" java.lang.NullPointerException at net.vortexdata.tsqpf.console.ConsoleHandler.run(ConsoleHandler.java:136) at java.lang.Thread.run(Thread.java:748)
NullPointerException is triggered, because of a return value in UserManager.java:194.

Add Command Handler

Add a command handler for plugins which can register console and teamspeak chat commands.

Framework plugin load error in log, but plugin is loaded and works fine

Log output down below:

[08/12/2019 20:48:44] [DEBUG] Loading and enabling plugins...
[08/12/2019 20:48:44] [INFO] PrivateChannel not loaded!!
[08/12/2019 20:48:44] [DEBUG] plugins\PrivateChannelnot loaded!! PluginMain
[08/12/2019 20:48:44] [INFO] Successfully loaded PrivateChannel
[08/12/2019 20:48:44] [INFO] Successfully loaded WelcomeMessage
[08/12/2019 20:48:44] [INFO] WelcomeMessage not loaded!!
[08/12/2019 20:48:44] [DEBUG] plugins\WelcomeMessagenot loaded!! PluginMain
[08/12/2019 20:48:44] [INFO] [PrivateChannel] PrivateChannel enabled.
[08/12/2019 20:48:44] [INFO] [WelcomeMessage] WelcomeMessage loaded.
[08/12/2019 20:48:44] [DEBUG] Successfully loaded plugins.

Both plugins work fine.

Fix duplicate plugin loading

If there are more than one plugins in the plugins directory with the same name they will all be loaded without any warning or errors. This should be fixed by only loading one instance and skipping the others.

Additionally, it would be useful to print a warning to the console and log informing the administrator about the issue.

Remove bugged terminal and add Client connections

Remove frameworks integrated terminal and split framework in Core and Client. The client is run on the user's personal machine, logging into the frameworks client session socket and enabling the client to run commands on the framework.

  • Add Framework Client Session Handler

  • Add Framework User Manager

  • Secure Socket Connection

  • Create Client

Add multi-config system

This new system should allow plugin developers to create more than the default "plugin.conf" file.

Add a getPlugin framework method

This method can be used by plugins (getFramework().getPlugin(String pluginName)) to get variables, objects, configs and co. In short, this should greatly simplify cross-communication between multiple plugins.

Add framework and plugins command

With this update, two new commands should be implemented:

framework

  • no parameter: Shows syntax
  • reload: Reloads the whole framework, including configs, plugins, etc...
  • stop / exit / shutdown: Shuts down the framework.
  • kill: Kills the framework.
  • stats: returns a overview of the frameworks hardware usage, prozess status and etc.

plugins

  • no parameter: Shows a list of all plugins and their status.
  • reload: Reloads all plugins and their configuration.
  • find : Return details of the desired plugin
  • disable : Will disable the desired plugin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.