Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Console commands #6

Closed
Liareth opened this issue Jan 17, 2018 · 1 comment
Closed

Console commands #6

Liareth opened this issue Jan 17, 2018 · 1 comment
Labels
RFE: core Enhancement to the core NWNX system

Comments

@Liareth
Copy link
Member

Liareth commented Jan 17, 2018

We need the following commands to be enterable in the console:

  • load : loads the plugin.
  • unload : if loaded, unloads the plugin.
  • reload : unloads then loads the plugin

It would also be cool to have the ability to set config options from the console. Imagine ... :

  • set NWNX_CHAT_LOG_LEVEL=7
  • reload NWNX_Chat
    (now you have debug info, you debug on the fly to find an issue on a live server)
  • unset NWNX_CHAT_LOG_LEVEL
  • reload NWNX_Chat
    (back to normal)

Help should output info on these additional commands. It should be implemented through a service so other plugins can add their own custom commands.

  • GetServices()->m_Commands->RegisterCommand(std::string command, std::function<bool(std::string)>) is an example API that could be used.

This is important for the profiler and could be very useful for many other plugins. I want people to be able to selectively load it during laggy times to get 30 seconds - 1 minute of important metrics then unload it again.

@mtijanic
Copy link
Member

mtijanic commented Nov 7, 2019

The RFE for console commands is done. The other things mentioned here are regarding plugin hotloading, which is a whole new issue - #637

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFE: core Enhancement to the core NWNX system
Projects
None yet
Development

No branches or pull requests

2 participants