Browse Source

sorting of !stats roles

master
jcao219 13 years ago
parent
commit
9c19a901d4
  1. 8
      botconfig.py.example
  2. 13
      wolfgame.py

8
botconfig.py → botconfig.py.example

@ -1,8 +1,8 @@ @@ -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

@ -415,6 +415,19 @@ def stats(cli, nick, chan, rest): @@ -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…
Cancel
Save