Permalink
Browse files

リプライ制限の解除のタイミングがおかしい不具合を修正

  • Loading branch information...
shogo82148 committed Apr 8, 2012
1 parent 0810404 commit 2d579f8899a3a006e2bb82e29c30699b019bf78e
Showing with 5 additions and 6 deletions.
  1. +5 −6 TwitterBot/AdminFunctions.py
@@ -98,6 +98,11 @@ def __call__(self, bot, status):
history = self.reply_history
now = time.time()
+ #古い履歴は削除
+ for name in history.keys():
+ if now-history[name]['time']>self.reset_cycle:
+ del history[name]
+
#履歴更新
if author in history:
if history[author]['count']==self.reply_limit and self.limit_msg:
@@ -115,10 +120,4 @@ def __call__(self, bot, status):
'time': now,
'count': 1,
}
-
- #古い履歴は削除
- for name in history.keys():
- if now-history[name]['time']>self.reset_cycle:
- del history[name]
-
return False

0 comments on commit 2d579f8

Please sign in to comment.