|
|
@ -24,7 +24,9 @@ hook = decorators.generate(HOOKS, raw_nick=True) |
|
|
|
# Game Logic Begins: |
|
|
|
# Game Logic Begins: |
|
|
|
|
|
|
|
|
|
|
|
def connect_callback(cli): |
|
|
|
def connect_callback(cli): |
|
|
|
cli.identify(botconfig.PASS) |
|
|
|
cli.ns_identify(botconfig.PASS) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def prepare_stuff(): |
|
|
|
cli.join(botconfig.CHANNEL) |
|
|
|
cli.join(botconfig.CHANNEL) |
|
|
|
cli.msg("ChanServ", "op "+botconfig.CHANNEL) |
|
|
|
cli.msg("ChanServ", "op "+botconfig.CHANNEL) |
|
|
|
|
|
|
|
|
|
|
@ -37,6 +39,22 @@ def connect_callback(cli): |
|
|
|
var.USERS.append(user) |
|
|
|
var.USERS.append(user) |
|
|
|
cli.who(botconfig.CHANNEL) |
|
|
|
cli.who(botconfig.CHANNEL) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@hook("nicknameinuse") |
|
|
|
|
|
|
|
def mustghost(cli, *blah): |
|
|
|
|
|
|
|
cli.nick(botconfig.NICK+"_") |
|
|
|
|
|
|
|
cli.ns_identify(botconfig.PASS) |
|
|
|
|
|
|
|
cli.ns_ghost() |
|
|
|
|
|
|
|
cli.nick(botconfig.NICK) |
|
|
|
|
|
|
|
prepare_stuff() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@hook("unavailresource") |
|
|
|
|
|
|
|
def mustrelease(cli, *blah): |
|
|
|
|
|
|
|
cli.nick(botconfig.NICK+"_") |
|
|
|
|
|
|
|
cli.ns_identify(botconfig.PASS) |
|
|
|
|
|
|
|
cli.ns_release() |
|
|
|
|
|
|
|
cli.nick(botconfig.NICK) |
|
|
|
|
|
|
|
prepare_stuff() |
|
|
|
|
|
|
|
|
|
|
|
var.LAST_PING = 0 # time of last ping |
|
|
|
var.LAST_PING = 0 # time of last ping |
|
|
|
var.ROLES = {"person" : []} |
|
|
|
var.ROLES = {"person" : []} |
|
|
|
var.PHASE = "none" # "join", "day", or "night" |
|
|
|
var.PHASE = "none" # "join", "day", or "night" |
|
|
@ -54,6 +72,7 @@ def connect_callback(cli): |
|
|
|
var.GRAVEYARD = [] |
|
|
|
var.GRAVEYARD = [] |
|
|
|
var.GRAVEYARD_LOCK = threading.Lock() |
|
|
|
var.GRAVEYARD_LOCK = threading.Lock() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
prepare_stuff() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def mass_mode(cli, md): |
|
|
|
def mass_mode(cli, md): |
|
|
|