From 36c6480659c9307f664ac0dc1adcd0028d3af2f9 Mon Sep 17 00:00:00 2001 From: jcao219 Date: Fri, 29 Jul 2011 22:29:41 -0500 Subject: [PATCH] trivial changes (nothing that affects the code) - moving lines around to organize it better --- oyoyo/client.py | 4 +--- var.py | 6 +++--- wolfgame.py | 1 - 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/oyoyo/client.py b/oyoyo/client.py index c1399f9..7dc53c5 100644 --- a/oyoyo/client.py +++ b/oyoyo/client.py @@ -20,9 +20,7 @@ import time import threading 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/ class TokenBucket(object): diff --git a/var.py b/var.py index 60a0d34..b0350c7 100644 --- a/var.py +++ b/var.py @@ -11,7 +11,6 @@ START_WITH_DAY = False KILL_IDLE_TIME = 300 WARN_IDLE_TIME = 180 GAME_COMMAND_ADMIN_ONLY = True -AWAY = [] # cloaks of people who are away. # HIT MISS SUICIDE 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 DETECTIVE_REVEALED_CHANCE = 2/5 -GAME_MODES = {} - ################################################################################################################# # 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: ## ################################################################################################################# +GAME_MODES = {} +AWAY = [] # cloaks of people who are away. ROLE_INDICES = {0 : "seer", 1 : "wolf", @@ -51,6 +50,7 @@ ROLE_INDICES = {0 : "seer", 7 : "werecrow", 8 : "guardian angel", 9 : "detective"} + INDEX_OF_ROLE = dict((v,k) for k,v in ROLE_INDICES.items()) diff --git a/wolfgame.py b/wolfgame.py index 41de10a..4560ce5 100644 --- a/wolfgame.py +++ b/wolfgame.py @@ -420,7 +420,6 @@ def on_kicked(cli, nick, chan, victim, reason): if victim == botconfig.NICK: cli.join(botconfig.CHANNEL) cli.msg("ChanServ", "op "+botconfig.CHANNEL) - # cli.kick(chan, nick, "No.")