Set unique user properly.
This commit is contained in:
parent
95712e5520
commit
82a20a209a
1 changed files with 4 additions and 3 deletions
|
@ -96,11 +96,10 @@ class Module(object):
|
||||||
return
|
return
|
||||||
|
|
||||||
user = event["user"]
|
user = event["user"]
|
||||||
hostname = user.hostname
|
|
||||||
game = channel.games["ducks"]
|
game = channel.games["ducks"]
|
||||||
|
|
||||||
if hostname not in game["unique_nicks"]:
|
if user not in game["unique_nicks"]:
|
||||||
game["unique_nicks"].append(hostname)
|
game["unique_nicks"].append(user)
|
||||||
|
|
||||||
if game["current_unique_nicks"] > 0:
|
if game["current_unique_nicks"] > 0:
|
||||||
game["current_unique_nicks"] = game["current_unique_nicks"] - 1
|
game["current_unique_nicks"] = game["current_unique_nicks"] - 1
|
||||||
|
@ -112,3 +111,5 @@ class Module(object):
|
||||||
if game["current_active_delay"] > 0:
|
if game["current_active_delay"] > 0:
|
||||||
game["current_active_delay"] = game["current_active_delay"] \
|
game["current_active_delay"] = game["current_active_delay"] \
|
||||||
- DELAY_REDUCE
|
- DELAY_REDUCE
|
||||||
|
|
||||||
|
print(game)
|
Loading…
Reference in a new issue