Merge branch 'master' of git://github.com/xnrand/seerwolf

This commit is contained in:
nyuszika7h 2014-02-01 19:36:19 +01:00
commit 781317785d
2 changed files with 13 additions and 1 deletions

View File

@ -73,6 +73,8 @@ var.illegal_joins = defaultdict(int)
var.LOGGER = WolfgameLogger(var.LOG_FILENAME, var.BARE_LOG_FILENAME) var.LOGGER = WolfgameLogger(var.LOG_FILENAME, var.BARE_LOG_FILENAME)
var.JOINED_THIS_GAME = [] # keeps track of who already joined this game at least once (cloaks)
if botconfig.DEBUG_MODE: if botconfig.DEBUG_MODE:
var.NIGHT_TIME_LIMIT = 0 # 90 var.NIGHT_TIME_LIMIT = 0 # 90
var.NIGHT_TIME_WARN = 0 var.NIGHT_TIME_WARN = 0
@ -178,6 +180,8 @@ def reset(cli):
var.ROLES = {"person" : []} var.ROLES = {"person" : []}
var.JOINED_THIS_GAME = []
reset_settings() reset_settings()
dict.clear(var.LAST_SAID_TIME) dict.clear(var.LAST_SAID_TIME)
@ -414,7 +418,14 @@ def join(cli, nick, chann_, rest):
cli.mode(chan, "+v", nick) cli.mode(chan, "+v", nick)
var.ROLES["person"].append(nick) var.ROLES["person"].append(nick)
cli.msg(chan, '\u0002{0}\u0002 has joined the game and raised the number of players to \u0002{1}\u0002.'.format(nick, len(pl) + 1)) cli.msg(chan, '\u0002{0}\u0002 has joined the game and raised the number of players to \u0002{1}\u0002.'.format(nick, len(pl) + 1))
if not cloak in var.JOINED_THIS_GAME:
# make sure this only happens one
var.JOINED_THIS_GAME.append(cloak)
now = datetime.now()
# make sure there's at least var.WAIT_AFTER_JOIN seconds of wait time left, if not add them
if now + timedelta(seconds=var.WAIT_AFTER_JOIN) > var.CAN_START_TIME:
var.CAN_START_TIME = now + timedelta(seconds=var.WAIT_AFTER_JOIN)
var.LAST_STATS = None # reset var.LAST_STATS = None # reset

View File

@ -2,6 +2,7 @@ PING_WAIT = 300 # Seconds
PING_MIN_WAIT = 30 # How long !start has to wait after a !ping PING_MIN_WAIT = 30 # How long !start has to wait after a !ping
MINIMUM_WAIT = 60 MINIMUM_WAIT = 60
EXTRA_WAIT = 20 EXTRA_WAIT = 20
WAIT_AFTER_JOIN = 10 # Wait at least this many seconds after the last join
MAXIMUM_WAITED = 3 # limit for amount of !wait's MAXIMUM_WAITED = 3 # limit for amount of !wait's
STATS_RATE_LIMIT = 60 STATS_RATE_LIMIT = 60
VOTES_RATE_LIMIT = 60 VOTES_RATE_LIMIT = 60