altcointip
altcointip copied to clipboard
Bug report: ignore quotes
I did a write-up on Reddit and then decided it would be better just to come to the source directly anyhow. See: http://www.reddit.com/r/ALTcointip/comments/1zczq2/bug_report_ignore_quotes/
Essentially: quoted text should not be scanned for commands. I tested this without funds, so it wasn't a problem, but proper behavior should be to ignore quoted commands because they are unlikely to be intended as instructions directed at the bot. Additionally, the bot should function on a "better safe than sorry" principle as is general practice with these types of bots.
If you've got the time to do it vindimy, I'll gladly leave it to you (although I certainly wouldn't mind reviewing the patch if you'd like). If you'd like another contributor, I can also roll up my sleeves and take a look at the code. Just let me know that you agree with my correct behavior (ignore quoted text for command parsing), and would like me to do so, and I'll get started as time permits.
Thanks, -mathwizard1232
The change should be made here it looks like:
https://github.com/vindimy/altcointip/blob/master/src/ctb/ctb_action.py#L916
I think it would be sufficient to make the regex start at the beginning of a line, or alternately, the beginning of a line plus arbitrary whitespace. Right now it looks like it's matching anywhere in the comment. All of the use I have seen, people make a separate line for the command, and I think that should be formalized as the expected syntax.