-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
Nice help #662
Nice help #662
Conversation
Since you didn't touch reload, reloading/loading modules won't change the help. Wouldn't it be better to have module loading update a dict of help messages instead of making the modules available at runtime and iterating on them? |
Overall, looks good. Apart from my minor nitpicks above (note they refer to specific lines) and the reload/load thing, it's almost good to be merged. It's really awesome and it will greatly improve the user experience of the bot. |
Thanks for the comments, I'll look into that. I was assuming a particular list of mods, but obviously, ensure the presence of a space is easy. I tried combining spaces for CLI clients and '\t' for GUI clients, but '\t' appears weird in CLI (in my case irssi shows an "I" on white background). I am fixing the situation for module loading anyway. |
No, sorry, load() and unload() is not something we want. When I talked about reloading module I talked about reload.py that is in the modules directory. This just overcomplicates everything and makes it harder to review. We don't want an unload method because there's no real safe way to unload things and having such method might cause miscommunications about it. Even reload is presented as "it might work, but in some cases it will be buggy and you'd have to restart". |
Let me rephrase the requirements for this to be merged, just so it'll be clear:
|
I want this in for 5.0... Are you going to work on this or should I do it myself? |
@qsantos are you going to address the above? |
Sorry for the long wait. I have removed the commits that were off-topic and use a dictionnary of available commands per module instead of a dictionnary of modules. Also, *register() takes the list of symbols as a parameter whereas I need the module name. I have thus added *register_help() which just takes the module. An alternative would be to change *register() so that they take a module as a parameter. |
@qsantos: Sorry for leaving this open for so long. The change has been implemented and will be in 6.0. Thanks for the contribution. |
Close sopel-irc#662, close sopel-irc#791. They needed to be reworked to deal with the new 6.0 loader. Same general idea, so thanks to @qsantos and @firerogue for their work there. Eventually, I'd like to open up that category to be settable to something other than the module name, but I'm not sure how I want to do that so we'll leave it as an undocumented little private hack for now.
A nicer and more intuitive help function