Skip to content
Browse files

Make ponies work in 2.6

  • Loading branch information...
1 parent 65439e3 commit 93436cd13bc1036cd62a0a3b296296ab5925cf02 @mythmon mythmon committed
Showing with 4 additions and 2 deletions.
  1. +4 −2 hamper/plugins/friendly.py
View
6 hamper/plugins/friendly.py
@@ -42,8 +42,10 @@ def setup(self, factory):
def process(self, bot, comm):
if re.match(r'.*pon(y|ies).*', comm['message'], re.I):
now = datetime.now()
- since_last_pony = now - self.last_pony_time
- if since_last_pony.total_seconds() >= self.cooldown:
+ since_last = now - self.last_pony_time
+ since_last = since_last.seconds + 24*3600*since_last.days
+
+ if since_last >= self.cooldown:
bot.msg(comm['channel'], 'OMG!!! PONIES!!!')
self.last_pony_time = now
else:

0 comments on commit 93436cd

Please sign in to comment.
Something went wrong with that request. Please try again.