Browse Source

trivial changes (nothing that affects the code) - moving lines around to organize it better

master
jcao219 14 years ago
parent
commit
36c6480659
  1. 2
      oyoyo/client.py
  2. 6
      var.py
  3. 1
      wolfgame.py

2
oyoyo/client.py

@ -22,8 +22,6 @@ import traceback
from oyoyo.parse import parse_raw_irc_command from oyoyo.parse import parse_raw_irc_command
# Adapted from http://code.activestate.com/recipes/511490-implementation-of-the-token-bucket-algorithm/ # Adapted from http://code.activestate.com/recipes/511490-implementation-of-the-token-bucket-algorithm/
class TokenBucket(object): class TokenBucket(object):
"""An implementation of the token bucket algorithm. """An implementation of the token bucket algorithm.

6
var.py

@ -11,7 +11,6 @@ START_WITH_DAY = False
KILL_IDLE_TIME = 300 KILL_IDLE_TIME = 300
WARN_IDLE_TIME = 180 WARN_IDLE_TIME = 180
GAME_COMMAND_ADMIN_ONLY = True GAME_COMMAND_ADMIN_ONLY = True
AWAY = [] # cloaks of people who are away.
# HIT MISS SUICIDE # HIT MISS SUICIDE
GUN_CHANCES = ( 5/7 , 1/7 , 1/7 ) GUN_CHANCES = ( 5/7 , 1/7 , 1/7 )
@ -22,8 +21,6 @@ GUNNER_KILLS_WOLF_AT_NIGHT_CHANCE = 1/2
GUARDIAN_ANGEL_DIES_CHANCE = 1/2 GUARDIAN_ANGEL_DIES_CHANCE = 1/2
DETECTIVE_REVEALED_CHANCE = 2/5 DETECTIVE_REVEALED_CHANCE = 2/5
GAME_MODES = {}
################################################################################################################# #################################################################################################################
# ROLE INDEX: PLAYERS SEER WOLF CURSED DRUNK HARLOT TRAITOR GUNNER CROW ANGEL DETECTIVE ## # ROLE INDEX: PLAYERS SEER WOLF CURSED DRUNK HARLOT TRAITOR GUNNER CROW ANGEL DETECTIVE ##
################################################################################################################# #################################################################################################################
@ -40,6 +37,8 @@ ROLES_GUIDE = { 4 : ( 1 , 1 , 0 , 0 , 0 , 0 , 0
# Notes: ## # Notes: ##
################################################################################################################# #################################################################################################################
GAME_MODES = {}
AWAY = [] # cloaks of people who are away.
ROLE_INDICES = {0 : "seer", ROLE_INDICES = {0 : "seer",
1 : "wolf", 1 : "wolf",
@ -51,6 +50,7 @@ ROLE_INDICES = {0 : "seer",
7 : "werecrow", 7 : "werecrow",
8 : "guardian angel", 8 : "guardian angel",
9 : "detective"} 9 : "detective"}
INDEX_OF_ROLE = dict((v,k) for k,v in ROLE_INDICES.items()) INDEX_OF_ROLE = dict((v,k) for k,v in ROLE_INDICES.items())

1
wolfgame.py

@ -420,7 +420,6 @@ def on_kicked(cli, nick, chan, victim, reason):
if victim == botconfig.NICK: if victim == botconfig.NICK:
cli.join(botconfig.CHANNEL) cli.join(botconfig.CHANNEL)
cli.msg("ChanServ", "op "+botconfig.CHANNEL) cli.msg("ChanServ", "op "+botconfig.CHANNEL)
# cli.kick(chan, nick, "No.")

Loading…
Cancel
Save