From f41763478a16f21c7f4b98244e1f5de0b19a5110 Mon Sep 17 00:00:00 2001 From: moneromooo Date: Fri, 6 Feb 2015 19:37:25 +0000 Subject: [PATCH] reddit: PMs now don't need the keyword to be parsed --- tipbot/modules/reddit.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tipbot/modules/reddit.py b/tipbot/modules/reddit.py index 19279dd..206ca33 100644 --- a/tipbot/modules/reddit.py +++ b/tipbot/modules/reddit.py @@ -115,14 +115,13 @@ class RedditNetwork(Network): self.last_seen_ids.add(item.id) redis_sadd('reddit:last_seen_ids',item.id) - if item.body.lower().find(self.keyword.lower()) >= 0: + if is_pm or item.body.lower().find(self.keyword.lower()) >= 0: group=None #if not is_pm and hasattr(item,'subreddit'): # group=Group(self,item.subreddit.display_name) group = None self.items_cache[item.fullname]=item link=Link(self,User(self,author),group,item) - log_info('Found keyword %s from %s' % (self.keyword,link.identity())) for line in item.body.split('\n'): if is_pm: exidx=line.find('!')