polished !stats more
This commit is contained in:
parent
9bd80bce5c
commit
fcc5b3cedc
16
wolfgame.py
16
wolfgame.py
@ -230,17 +230,19 @@ def stats(cli, nick, chan, rest):
|
|||||||
|
|
||||||
message = []
|
message = []
|
||||||
f = False
|
f = False
|
||||||
for role in set(list(var.ROLES.keys())+list(var.ORIGINAL_ROLES.keys())):
|
l1 = [k for k in var.ROLES.keys()
|
||||||
if not var.ROLES[role]:
|
if var.ROLES[k]]
|
||||||
continue # Never had this role, don't list it.
|
l2 = [k for k in var.ORIGINAL_ROLES.keys()
|
||||||
|
if var.ORIGINAL_ROLES[k]]
|
||||||
|
for role in set(l1+l2):
|
||||||
count = len(var.ROLES[role])
|
count = len(var.ROLES[role])
|
||||||
if not f:
|
if not f and count>1:
|
||||||
if count>1:
|
|
||||||
vb = "are"
|
vb = "are"
|
||||||
|
f = True
|
||||||
else:
|
else:
|
||||||
vb = "is"
|
vb = "is"
|
||||||
if count > 1 or count == 0:
|
if count > 1:
|
||||||
message.append("\u0002{0}\u0002 {1}".format(count if count else "no", var.plural(role)))
|
message.append("\u0002{0}\u0002 {1}".format(count, var.plural(role)))
|
||||||
else:
|
else:
|
||||||
message.append("\u0002{0}\u0002 {1}".format(count if count else "no", role))
|
message.append("\u0002{0}\u0002 {1}".format(count if count else "no", role))
|
||||||
cli.msg(chan, "{0}: There {3} {1}, and {2}.".format(nick,
|
cli.msg(chan, "{0}: There {3} {1}, and {2}.".format(nick,
|
||||||
|
Loading…
Reference in New Issue
Block a user