Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 2d579f8899a3a006e2bb82e29c30699b019bf78e 1 parent 0810404
@shogo82148 authored
Showing with 5 additions and 6 deletions.
  1. +5 −6 TwitterBot/AdminFunctions.py
View
11 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
Please sign in to comment.
Something went wrong with that request. Please try again.