1
0
mirror of http://aero2k.de/t/repos/urlbot-native.git synced 2017-09-06 15:25:38 +02:00

whitespace fixes

This commit is contained in:
Thorsten
2016-04-07 20:17:43 +02:00
parent 43950a70fb
commit fa9e970eeb

View File

@@ -1,11 +1,10 @@
# -*- coding: utf-8 -*-
import logging
import time
import random
import config
from plugin_system import pluginfunction, ptypes
log = logging.getLogger(__name__)
comment_joins_strings = [
@@ -17,8 +16,8 @@ comment_joins_strings = [
@config.config_locked
def comment_joins(**args):
# max elapsed time between the latest and the N latest join
timespan = 120
max_joins = 6
timespan = 120
max_joins = config.runtime_config_store
current_timestamp = int(time.time())
@@ -26,7 +25,7 @@ def comment_joins(**args):
arg_user_key = arg_user.lower()
if arg_user_key not in config.runtime_config_store['user_joins']:
config.runtime_config_store['user_joins'][arg_user_key] = [ current_timestamp ]
config.runtime_config_store['user_joins'][arg_user_key] = [current_timestamp]
config.runtimeconf_persist()
return None
@@ -42,7 +41,7 @@ def comment_joins(**args):
config.runtime_config_store['user_joins'].pop(arg_user_key)
config.runtimeconf_persist()
log.info("send comment on join")
return { 'msg': random.choice(comment_joins_strings) % arg_user }
return {'msg': random.choice(comment_joins_strings) % arg_user}
else:
user_joins.append(current_timestamp)
config.runtime_config_store['user_joins'][arg_user_key] = user_joins