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

Simplification & bug-fix of _extract_setting #28

Merged
merged 1 commit into from
Dec 18, 2017

Commits on Nov 20, 2017

  1. Simplification & bug-fix of _extract_setting

    There was the potential for an inconsistency in the event that a user passed any argument other than on/off.
    
    It would cause things like having the bot pm the user the setpm off message because PM's were actually on for the user.
    
    This patch prevents that issue by giving a third possible return value of 2. If '2' is returned, the bot will make no changes, inform the user that it can't understand the argument, and show the user the arguments that are accepted for the setpm command.
    
    The _extract_setting method has also been updated to stop hardcoding indexes, matching the above _extract_** methods
    JacobJerrell committed Nov 20, 2017
    Configuration menu
    Copy the full SHA
    01d16ee View commit details
    Browse the repository at this point in the history