-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Overview
Calling !help on a module with a blank line in its USAGE produces unwanted behavior.
Okay, why?
When !help is called, Bobbit produces a message with message.copy() for each line in USAGE. When there is a blank line in USAGE, one of these calls will be message.copy(body=''). In the copy method, the body evaluates to false and the original body of the !help command is copied. Because message.copy() also copies the nick, Bobbit sees this message as a command invocation and replies to it.
Affected Modules
Note: this list was made with the following dope one-liner
find src/bobbit/modules -maxdepth 1 -type f | xargs -I {} sh -c "sed -ne \"/USAGE[^=]*=/,/'''/p\" {} | grep -qE '^$' && echo \$(basename {})"
archive.py
bodule.py
brainfuck.py
clap.py
copypasta.py
googletranslate.py
grab.py
humanity.py
karma.py
metar.py
mock.py
rpcs.py
weather.py
wttr.py