sorting of !stats roles
This commit is contained in:
parent
512d5e7843
commit
400aa4028a
@ -1,8 +1,8 @@
|
||||
PASS = ""
|
||||
CHANNEL = ""
|
||||
PASS = "my_nickserv_pass"
|
||||
CHANNEL = "#mywolfgame"
|
||||
HOST = "irc.freenode.net"
|
||||
PORT = 6667
|
||||
NICK = "wolfbot"
|
||||
PORT = 6667 # SSL not supported yet
|
||||
NICK = "mywolfbot"
|
||||
OWNERS = ("unaffiliated/wolfbot_admin1",) # the comma is required at the end if there is one owner
|
||||
ADMINS = ("unaffiliated/wolfbot_admin2", "unaffiliated/wolfbot_admin3")
|
||||
CMD_CHAR = "!"
|
13
wolfgame.py
13
wolfgame.py
@ -415,6 +415,19 @@ def stats(cli, nick, chan, rest):
|
||||
rs = list(set(l1+l2))
|
||||
if "village drunk" in rs:
|
||||
rs.remove("village drunk") # drunk is not displayed
|
||||
|
||||
# Due to popular demand, picky ordering
|
||||
if "wolf" in rs:
|
||||
rs.remove("wolf")
|
||||
rs.insert(0, "wolf")
|
||||
if "seer" in rs:
|
||||
rs.remove("seer")
|
||||
rs.insert(1, "seer")
|
||||
if "villager" in rs:
|
||||
rs.remove("villager")
|
||||
rs.append("villager")
|
||||
|
||||
|
||||
firstcount = len(var.ROLES[rs[0]])
|
||||
if firstcount > 1 or not firstcount:
|
||||
vb = "are"
|
||||
|
Loading…
x
Reference in New Issue
Block a user