reddit: fix parsing of tips-as-replies

"+" was treated a valid number, since all parts were optional
This commit is contained in:
moneromooo 2015-07-28 18:43:57 +01:00
parent d1d1184f41
commit 903a587209

View file

@ -161,6 +161,7 @@ class RedditNetwork(Network):
author=parent_item.author.name
match=re.search("\+[0-9]*(\.[0-9]*)?",line)
amount=match.group(0)
if amount!='+':
synthetic_cmd=['tip',author,amount.replace('+','')]
log_log('Running synthetic command: %s' % (str(synthetic_cmd)))
self.on_command(link,synthetic_cmd)