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

Prompt admin for user log at user creation #903

Merged
merged 1 commit into from
Feb 12, 2017

Conversation

astorije
Copy link
Member

@astorije astorije commented Jan 29, 2017

I feel like more and more people are asking where to get channel logs on the IRC channel. We usually tell them to go enable the logs for individual users, but at that point it's already too late as logging was not enabled.

This ensures new users have logs enabled by default when using lounge add <username>. What do people think? I also feel this should be a prompt after asking for password (Enable user logging? (yes)). Happy to hear opinions.

This prompts admin about it, which defaults to being enabled. The prompt is rather forgiving, as yes, y, Y, etc. will be evaluated to true and everything else to false. It is fairly standard in CLIs to really care about the first letter when it's a yes/no type of question.

@astorije astorije added the Type: Feature Tickets that describe a desired feature or PRs that add them to the project. label Jan 29, 2017
@dgw
Copy link
Contributor

dgw commented Jan 30, 2017

I'd say enabling anything that will silently consume disk space by default is a bad idea. Prompting during user creation works, though. Maybe Save user's chat logs to disk? (yes) to make it clear that disk space will be used.

@astorije
Copy link
Member Author

I agree with all that. Thanks for your input, @dgw, I'll do that after releasing v2.2.0 (incomiiiiing!).

@astorije astorije force-pushed the astorije/log-users-by-default branch from 1ab05de to 410eff4 Compare February 1, 2017 06:26
@astorije astorije changed the title Enable user logging by default Prompt admin for user log at user creation Feb 1, 2017
@astorije
Copy link
Member Author

astorije commented Feb 1, 2017

@dgw, done!

That syntax is not the cleanest thing one can do (a prompt in a prompt) but considering the overall cleanliness of our CLI code, I think that's as good as it gets.
I'm sure when prompts become more complex (n levels of callbacks), we will have a chat about how to refactor it, but in the meantime, that should do.

@astorije
Copy link
Member Author

Would one of @thelounge/maintainers be able to review this? It's a pretty simple change so I think it could go with a patch release instead of waiting for a bigger minor release.

@xPaw xPaw added this to the 2.2.1 milestone Feb 12, 2017
@xPaw xPaw merged commit 6755524 into master Feb 12, 2017
@xPaw xPaw deleted the astorije/log-users-by-default branch February 12, 2017 07:39
matburnham pushed a commit to matburnham/lounge that referenced this pull request Sep 6, 2017
…-default

Prompt admin for user log at user creation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Tickets that describe a desired feature or PRs that add them to the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants