-
Notifications
You must be signed in to change notification settings - Fork 103
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
spam plugin should implement check_configuration #600
Comments
@jayvdb Can I be assigned this issue? |
Sure. i've sent you an invite to join @coala. |
@jayvdb I am a college fresher right now and I am just getting familiar with python and git. I understand some of the issue but not all of it. Could you please explain it in more detail? |
Ping @nvzard for help , here or on gitter room for coboro |
Guide at http://errbot.io/en/latest/user_guide/plugin_development/configuration.html The existing config (https://github.com/coala/corobo/blob/master/plugins/spam.py#L13) is CONFIG_TEMPLATE = {
'MAX_MSG_LEN': constants.MAX_MSG_LEN,
'MAX_LINES': constants.MAX_LINES
} And those constants are at https://github.com/coala/corobo/blob/master/plugins/constants.py so effectively the config default is CONFIG_TEMPLATE = {
'MAX_MSG_LEN': 1000,
'MAX_LINES': 20,
} The first config validation we need is to ensure that the user never sets MAX_LINES to 1 or 0 , as that causes the bot to go into meltdown. Just try to validate that one to begin with. Then you can try validating |
@jayvdb I am not sure where exactly am I supposed to write the validation. |
You add it to First you need to install and run corobo. |
Errbot isn't being detected on my system. And running corobo by the docker image shows something like this: https://pastebin.com/kLDFqJn3 |
@CodeSparkle |
MAX_LINES
= 1 is invalid, as it will mean anyone writing one line is spamming, which is silly.MAX_MSG_LEN
<= length of BOT_PREFIX is invalid, as means invoking a command is spamming, which is silly.The text was updated successfully, but these errors were encountered: