Browse Source

KLAAR

translation
Jeebeevee 10 years ago committed by Rogier Neeleman
parent
commit
e5e89f199e
  1. 175
      modules/wolfgame.py

175
modules/wolfgame.py

@ -2155,24 +2155,24 @@ def transition_night(cli):
continue continue
norm_notify = g in var.PLAYERS and var.PLAYERS[g]["cloak"] not in var.SIMPLE_NOTIFY norm_notify = g in var.PLAYERS and var.PLAYERS[g]["cloak"] not in var.SIMPLE_NOTIFY
if norm_notify: if norm_notify:
gun_msg = ("You hold a gun that shoots special silver bullets. You may only use it "+ gun_msg = ("Jij hebt een geweer met zilveren kogels. Je kunt hem alleen "+
"during the day. If you shoot a wolf, (s)he will die instantly, but if you "+ "overdag gebruiken. Als je op een wolf schiet, hij/zij zal direct sterven, maar schiet "+
"shoot a villager, that villager will likely survive. You get {0}.") "je een burger, de burger zal het waarschijnlijk overleven. Je hebt {0}.")
else: else:
gun_msg = ("You have a \02gun\02 with {0}.") gun_msg = ("Je hebt een \02geweer\02 met {0}.")
if var.GUNNERS[g] == 1: if var.GUNNERS[g] == 1:
gun_msg = gun_msg.format("1 bullet") gun_msg = gun_msg.format("1 kogel")
elif var.GUNNERS[g] > 1: elif var.GUNNERS[g] > 1:
gun_msg = gun_msg.format(str(var.GUNNERS[g]) + " bullets") gun_msg = gun_msg.format(str(var.GUNNERS[g]) + " kogels")
else: else:
continue continue
pm(cli, g, gun_msg) pm(cli, g, gun_msg)
dmsg = (daydur_msg + "It is now nighttime. All players "+ dmsg = (daydur_msg + "Het is nu nacht. Alle spelers "+
"check for PMs from me for instructions. "+ "controleer je prive bericht voor instructies. "+
"If you did not receive one, simply sit back, "+ "Heb je er geen ontvangen, blijf dan rustig zitten, "+
"relax, and wait patiently for morning.") "relax, en wacht op de morgen die gaat komen.")
cli.msg(chan, dmsg) cli.msg(chan, dmsg)
var.LOGGER.logMessage(dmsg.replace("\02", "")) var.LOGGER.logMessage(dmsg.replace("\02", ""))
var.LOGGER.logBare("NIGHT", "BEGIN") var.LOGGER.logBare("NIGHT", "BEGIN")
@ -2193,7 +2193,7 @@ def cgamemode(cli, *args):
modeargs = arg.split("=", 1) modeargs = arg.split("=", 1)
if len(modeargs) < 2: # no equal sign in the middle of the arg if len(modeargs) < 2: # no equal sign in the middle of the arg
cli.msg(botconfig.CHANNEL, "Invalid syntax.") cli.msg(botconfig.CHANNEL, "ongeldige syntaxis.")
return False return False
modeargs[0] = modeargs[0].strip() modeargs[0] = modeargs[0].strip()
@ -2210,10 +2210,10 @@ def cgamemode(cli, *args):
setattr(var, attr, val) setattr(var, attr, val)
return True return True
except var.InvalidModeException as e: except var.InvalidModeException as e:
cli.msg(botconfig.CHANNEL, "Invalid mode: "+str(e)) cli.msg(botconfig.CHANNEL, "ongeldige modes: "+str(e))
return False return False
else: else:
cli.msg(chan, "Mode \u0002{0}\u0002 not found.".format(modeargs[0])) cli.msg(chan, "Modes \u0002{0}\u0002 niet gevonden.".format(modeargs[0]))
@cmd("start") @cmd("start")
@ -2229,21 +2229,21 @@ def start(cli, nick, chann_, rest):
cli.notice(nick, "Er is geen spel bezig.") cli.notice(nick, "Er is geen spel bezig.")
return return
if var.PHASE != "join": if var.PHASE != "join":
cli.notice(nick, "Werewolf is already in play.") cli.notice(nick, "Weerwolven is al bezig.")
return return
if nick not in villagers and nick != chan: if nick not in villagers and nick != chan:
cli.notice(nick, "You're currently not playing.") cli.notice(nick, "Je speelt nu niet mee.")
return return
now = datetime.now() now = datetime.now()
var.GAME_START_TIME = now # Only used for the idler checker var.GAME_START_TIME = now # Only used for the idler checker
dur = int((var.CAN_START_TIME - now).total_seconds()) dur = int((var.CAN_START_TIME - now).total_seconds())
if dur > 0: if dur > 0:
cli.msg(chan, "Please wait at least {0} more seconds.".format(dur)) cli.msg(chan, "Wacht minimaal nog z'n {0} seconden.".format(dur))
return return
if len(villagers) < 4: if len(villagers) < 4:
cli.msg(chan, "{0}: Four or more players are required to play.".format(nick)) cli.msg(chan, "{0}: Er zijn vier of meer spelers nodig voor dit spel.".format(nick))
return return
for pcount in range(len(villagers), 3, -1): for pcount in range(len(villagers), 3, -1):
@ -2254,35 +2254,35 @@ def start(cli, nick, chann_, rest):
if var.ORIGINAL_SETTINGS: # Custom settings if var.ORIGINAL_SETTINGS: # Custom settings
while True: while True:
wvs = (addroles[var.INDEX_OF_ROLE["wolf"]] + wvs = (addroles[var.INDEX_OF_ROLE["wolf"]] +
addroles[var.INDEX_OF_ROLE["traitor"]]) addroles[var.INDEX_OF_ROLE["verrader"]])
if len(villagers) < (sum(addroles) - addroles[var.INDEX_OF_ROLE["gunner"]] - if len(villagers) < (sum(addroles) - addroles[var.INDEX_OF_ROLE["kanonnier"]] -
addroles[var.INDEX_OF_ROLE["cursed villager"]]): addroles[var.INDEX_OF_ROLE["vervloekte burger"]]):
cli.msg(chan, "There are too few players in the "+ cli.msg(chan, "Er zijn te weinig spelers in het "+
"game to use the custom roles.") "spel om de standaard regels te gebruiken.")
elif not wvs: elif not wvs:
cli.msg(chan, "There has to be at least one wolf!") cli.msg(chan, "Er moet minimaal één wolf zijn!")
elif wvs > (len(villagers) / 2): elif wvs > (len(villagers) / 2):
cli.msg(chan, "Too many wolves.") cli.msg(chan, "Er zijn te veel wolven.")
else: else:
break break
reset_settings() reset_settings()
cli.msg(chan, "The default settings have been restored. Please !start again.") cli.msg(chan, "De standaard instellingen zijn teruggezet. Start opnieuw.")
var.PHASE = "join" var.PHASE = "join"
return return
if var.ADMIN_TO_PING: if var.ADMIN_TO_PING:
if "join" in COMMANDS.keys(): if "join" in COMMANDS.keys():
COMMANDS["join"] = [lambda *spam: cli.msg(chan, "This command has been disabled by an admin.")] COMMANDS["join"] = [lambda *spam: cli.msg(chan, "Dit commanda is uitgeschakeld door een administrator.")]
if "start" in COMMANDS.keys(): if "start" in COMMANDS.keys():
COMMANDS["start"] = [lambda *spam: cli.msg(chan, "This command has been disabled by an admin.")] COMMANDS["start"] = [lambda *spam: cli.msg(chan, "Dit commanda is uitgeschakeld door een administrator.")]
var.ROLES = {} var.ROLES = {}
var.CURSED = [] var.CURSED = []
var.GUNNERS = {} var.GUNNERS = {}
var.WOLF_GUNNERS = {} var.WOLF_GUNNERS = {}
villager_roles = ("gunner", "cursed villager") villager_roles = ("kanonnier", "vervloekte burger")
for i, count in enumerate(addroles): for i, count in enumerate(addroles):
role = var.ROLE_INDICES[i] role = var.ROLE_INDICES[i]
if role in villager_roles: if role in villager_roles:
@ -2295,40 +2295,39 @@ def start(cli, nick, chann_, rest):
# Now for the villager roles # Now for the villager roles
# Select cursed (just a villager) # Select cursed (just a villager)
if var.ROLES["cursed villager"]: if var.ROLES["vervloekte burger"]:
possiblecursed = pl[:] possiblecursed = pl[:]
for cannotbe in (var.ROLES["wolf"] + var.ROLES["werecrow"] + for cannotbe in (var.ROLES["wolf"] + var.ROLES["weerkraai"] +
var.ROLES["seer"] + var.ROLES["village drunk"]): var.ROLES["ziener"] + var.ROLES["dronken burger"]):
# traitor can be cursed # traitor can be cursed
possiblecursed.remove(cannotbe) possiblecursed.remove(cannotbe)
var.CURSED = random.sample(possiblecursed, len(var.ROLES["cursed villager"])) var.CURSED = random.sample(possiblecursed, len(var.ROLES["vervloekte burger"]))
del var.ROLES["cursed villager"] del var.ROLES["vervloekte burger"]
# Select gunner (also a villager) # Select gunner (also a villager)
if var.ROLES["gunner"]: if var.ROLES["kanonnier"]:
possible = pl[:] possible = pl[:]
for cannotbe in (var.ROLES["wolf"] + var.ROLES["werecrow"] + for cannotbe in (var.ROLES["wolf"] + var.ROLES["weerkraai"] +
var.ROLES["traitor"]): var.ROLES["verrader"]):
possible.remove(cannotbe) possible.remove(cannotbe)
for csd in var.CURSED: # cursed cannot be gunner for csd in var.CURSED: # cursed cannot be gunner
if csd in possible: if csd in possible:
possible.remove(csd) possible.remove(csd)
for gnr in random.sample(possible, len(var.ROLES["gunner"])): for gnr in random.sample(possible, len(var.ROLES["kanonnier"])):
if gnr in var.ROLES["village drunk"]: if gnr in var.ROLES["dronken burger"]:
var.GUNNERS[gnr] = (var.DRUNK_SHOTS_MULTIPLIER * var.GUNNERS[gnr] = (var.DRUNK_SHOTS_MULTIPLIER *
math.ceil(var.SHOTS_MULTIPLIER * len(pl))) math.ceil(var.SHOTS_MULTIPLIER * len(pl)))
else: else:
var.GUNNERS[gnr] = math.ceil(var.SHOTS_MULTIPLIER * len(pl)) var.GUNNERS[gnr] = math.ceil(var.SHOTS_MULTIPLIER * len(pl))
del var.ROLES["gunner"] del var.ROLES["kanonnier"]
var.ROLES["villager"] = villagers var.ROLES["burger"] = villagers
cli.msg(chan, ("{0}: Welcome to Werewolf, the popular rechercheur/social party "+ cli.msg(chan, ("{0}: Welkom bij Weerwolven van Wakkerdam.").format(", ".join(pl)))
"game (a theme of Mafia).").format(", ".join(pl)))
cli.mode(chan, "+m") cli.mode(chan, "+m")
var.ORIGINAL_ROLES = copy.deepcopy(var.ROLES) # Make a copy var.ORIGINAL_ROLES = copy.deepcopy(var.ROLES) # Make a copy
@ -2338,7 +2337,7 @@ def start(cli, nick, chann_, rest):
var.DAY_START_TIME = None var.DAY_START_TIME = None
var.NIGHT_START_TIME = None var.NIGHT_START_TIME = None
var.LOGGER.log("Game Start") var.LOGGER.log("Spel Start")
var.LOGGER.logBare("GAME", "BEGIN", nick) var.LOGGER.logBare("GAME", "BEGIN", nick)
var.LOGGER.logBare(str(len(pl)), "PLAYERCOUNT") var.LOGGER.logBare(str(len(pl)), "PLAYERCOUNT")
@ -2358,14 +2357,14 @@ def start(cli, nick, chann_, rest):
var.LOGGER.logBare(plr, "ROLE", rol) var.LOGGER.logBare(plr, "ROLE", rol)
if var.CURSED: if var.CURSED:
var.LOGGER.log("Cursed Villagers: "+", ".join(var.CURSED)) var.LOGGER.log("Vervloekten: "+", ".join(var.CURSED))
for plr in var.CURSED: for plr in var.CURSED:
var.LOGGER.logBare(plr+" ROLE cursed villager") var.LOGGER.logBare(plr+" ROLE vevloekte burger")
if var.GUNNERS: if var.GUNNERS:
var.LOGGER.log("Villagers With Bullets: "+", ".join([x+"("+str(y)+")" for x,y in var.GUNNERS.items()])) var.LOGGER.log("Burgers met kogels: "+", ".join([x+"("+str(y)+")" for x,y in var.GUNNERS.items()]))
for plr in var.GUNNERS: for plr in var.GUNNERS:
var.LOGGER.logBare(plr, "ROLE gunner") var.LOGGER.logBare(plr, "ROLE kanonnier")
var.LOGGER.log("***") var.LOGGER.log("***")
@ -2408,10 +2407,10 @@ def wait(cli, nick, chann_, rest):
cli.notice(nick, "Werewolf is already in play.") cli.notice(nick, "Werewolf is already in play.")
return return
if nick not in pl: if nick not in pl:
cli.notice(nick, "You're currently not playing.") cli.notice(nick, "Je speelt nu niet mee.")
return return
if var.WAITED >= var.MAXIMUM_WAITED: if var.WAITED >= var.MAXIMUM_WAITED:
cli.msg(chan, "Limit has already been reached for extending the wait time.") cli.msg(chan, "Het maximale aantal keren voor het uitbreiden van de wacht tijd is bereikt.")
return return
now = datetime.now() now = datetime.now()
@ -2420,8 +2419,8 @@ def wait(cli, nick, chann_, rest):
else: else:
var.CAN_START_TIME += timedelta(seconds=var.EXTRA_WAIT) var.CAN_START_TIME += timedelta(seconds=var.EXTRA_WAIT)
var.WAITED += 1 var.WAITED += 1
cli.msg(chan, ("\u0002{0}\u0002 increased the wait time by "+ cli.msg(chan, ("\u0002{0}\u0002 heeft de wachttijd verlengt met "+
"{1} seconds.").format(nick, var.EXTRA_WAIT)) "{1} seconden.").format(nick, var.EXTRA_WAIT))
@ -2437,7 +2436,7 @@ def fwait(cli, nick, chann_, rest):
cli.notice(nick, "Er is geen spel bezig.") cli.notice(nick, "Er is geen spel bezig.")
return return
if var.PHASE != "join": if var.PHASE != "join":
cli.notice(nick, "Werewolf is already in play.") cli.notice(nick, "Weerwolven is al bezig.")
return return
rest = re.split(" +", rest.strip(), 1)[0] rest = re.split(" +", rest.strip(), 1)[0]
@ -2445,7 +2444,7 @@ def fwait(cli, nick, chann_, rest):
if len(rest) < 4: if len(rest) < 4:
extra = int(rest) extra = int(rest)
else: else:
cli.msg(chan, "{0}: We don't have all day!".format(nick)) cli.msg(chan, "{0}: We hebben niet de hele dag!".format(nick))
return return
else: else:
extra = var.EXTRA_WAIT extra = var.EXTRA_WAIT
@ -2456,8 +2455,8 @@ def fwait(cli, nick, chann_, rest):
else: else:
var.CAN_START_TIME += timedelta(seconds=extra) var.CAN_START_TIME += timedelta(seconds=extra)
var.WAITED += 1 var.WAITED += 1
cli.msg(chan, ("\u0002{0}\u0002 forcibly increased the wait time by "+ cli.msg(chan, ("\u0002{0}\u0002 heeft de wachttijd geforceerd verlengt met "+
"{1} seconds.").format(nick, extra)) "{1} seconden.").format(nick, extra))
@cmd("fstop",admin_only=True) @cmd("fstop",admin_only=True)
@ -2465,8 +2464,8 @@ def reset_game(cli, nick, chan, rest):
if var.PHASE == "geen": if var.PHASE == "geen":
cli.notice(nick, "Er is geen spel bezig.") cli.notice(nick, "Er is geen spel bezig.")
return return
cli.msg(botconfig.CHANNEL, "\u0002{0}\u0002 has forced the game to stop.".format(nick)) cli.msg(botconfig.CHANNEL, "\u0002{0}\u0002 heeft het spel geforceerd gestopt.".format(nick))
var.LOGGER.logMessage("{0} has forced the game to stop.".format(nick)) var.LOGGER.logMessage("{0} heeft het spel geforceerd gestopt.".format(nick))
if var.PHASE != "join": if var.PHASE != "join":
stop_game(cli) stop_game(cli)
else: else:
@ -2480,7 +2479,7 @@ def pm_rules(cli, nick, rest):
@cmd("rules") @cmd("rules")
def show_rules(cli, nick, chan, rest): def show_rules(cli, nick, chan, rest):
"""Displays the rules""" """Displays the rules"""
if var.PHASE in ("day", "night") and nick not in var.list_players(): if var.PHASE in ("dag", "nacht") and nick not in var.list_players():
cli.notice(nick, var.RULES) cli.notice(nick, var.RULES)
return return
cli.msg(botconfig.CHANNEL, var.RULES) cli.msg(botconfig.CHANNEL, var.RULES)
@ -2519,9 +2518,9 @@ def get_help(cli, rnick, rest):
continue continue
else: else:
if not found: if not found:
pm(cli, nick, "Command not found.") pm(cli, nick, "Commando niet gevonden.")
else: else:
pm(cli, nick, "Documentation for this command is not available.") pm(cli, nick, "Er is geen hulp bij dit commando beschikbaar.")
return return
# if command was not found, or if no command was given: # if command was not found, or if no command was given:
for name, fn in COMMANDS.items(): for name, fn in COMMANDS.items():
@ -2566,11 +2565,11 @@ def show_admins(cli, nick, chan, rest):
if (var.LAST_ADMINS and if (var.LAST_ADMINS and
var.LAST_ADMINS + timedelta(seconds=var.ADMINS_RATE_LIMIT) > datetime.now()): var.LAST_ADMINS + timedelta(seconds=var.ADMINS_RATE_LIMIT) > datetime.now()):
cli.notice(nick, ("This command is rate-limited. " + cli.notice(nick, ("Dit commando heeft een gebruikerslimiet. " +
"Please wait a while before using it again.")) "Wacht even voor je hem weer gebruikt."))
return return
if not (var.PHASE in ("day", "night") and nick not in pl): if not (var.PHASE in ("dag", "nacht") and nick not in pl):
var.LAST_ADMINS = datetime.now() var.LAST_ADMINS = datetime.now()
if var.ADMIN_PINGING: if var.ADMIN_PINGING:
@ -2592,10 +2591,10 @@ def show_admins(cli, nick, chan, rest):
return return
admins.sort(key=lambda x: x.lower()) admins.sort(key=lambda x: x.lower())
if var.PHASE in ("day", "night") and nick not in pl: if var.PHASE in ("dag", "nacht") and nick not in pl:
cli.notice(nick, "Available admins: "+" ".join(admins)) cli.notice(nick, "Beschikbare admins: "+" ".join(admins))
else: else:
cli.msg(chan, "Available admins: "+" ".join(admins)) cli.msg(chan, "Beschikbare admins: "+" ".join(admins))
decorators.unhook(HOOKS, 4) decorators.unhook(HOOKS, 4)
var.ADMIN_PINGING = False var.ADMIN_PINGING = False
@ -2608,13 +2607,13 @@ def show_admins(cli, nick, chan, rest):
def coin(cli, nick, chan, rest): def coin(cli, nick, chan, rest):
"""It's a bad idea to base any decisions on this command.""" """It's a bad idea to base any decisions on this command."""
if var.PHASE in ("day", "night") and nick not in var.list_players(): if var.PHASE in ("dag", "nacht") and nick not in var.list_players():
cli.notice(nick, "You may not use this command right now.") cli.notice(nick, "Je kunt dit commando nu niet gebruiken.")
return return
cli.msg(chan, "\2{0}\2 tosses a coin into the air...".format(nick)) cli.msg(chan, "\2{0}\2 gooit een munt in de lucht...".format(nick))
var.LOGGER.logMessage("{0} tosses a coin into the air...".format(nick)) var.LOGGER.logMessage("{0} gooit een munt in de lucht...".format(nick))
cmsg = "The coin lands on \2{0}\2.".format("heads" if random.random() < 0.5 else "tails") cmsg = "De munt land op \2{0}\2.".format("kop" if random.random() < 0.5 else "munt")
cli.msg(chan, cmsg) cli.msg(chan, cmsg)
var.LOGGER.logMessage(cmsg) var.LOGGER.logMessage(cmsg)
@ -2637,15 +2636,15 @@ def aftergame(cli, rawnick, rest):
for fn in COMMANDS[cmd]: for fn in COMMANDS[cmd]:
fn(cli, rawnick, botconfig.CHANNEL, " ".join(rst)) fn(cli, rawnick, botconfig.CHANNEL, " ".join(rst))
else: else:
cli.notice(nick, "That command was not found.") cli.notice(nick, "Dit commando is niet gevonden.")
return return
if var.PHASE == "geen": if var.PHASE == "geen":
do_action() do_action()
return return
cli.msg(chan, ("The command \02{0}\02 has been scheduled to run "+ cli.msg(chan, ("Het commando \02{0}\02 is ingeplanned om uitgevoerd te worden "+
"after this game by \02{1}\02.").format(cmd, nick)) "na dit spel door \02{1}\02.").format(cmd, nick))
var.AFTER_FLASTGAME = do_action var.AFTER_FLASTGAME = do_action
@ -2653,7 +2652,7 @@ def aftergame(cli, rawnick, rest):
@cmd("faftergame", admin_only=True, raw_nick=True) @cmd("faftergame", admin_only=True, raw_nick=True)
def _faftergame(cli, nick, chan, rest): def _faftergame(cli, nick, chan, rest):
if not rest.strip(): if not rest.strip():
cli.notice(parse_nick(nick)[0], "Incorrect syntax for this command.") cli.notice(parse_nick(nick)[0], "Onjuiste syntax voor dit commando.")
return return
aftergame(cli, nick, rest) aftergame(cli, nick, rest)
@ -2673,11 +2672,11 @@ def flastgame(cli, nick, rest):
chan = botconfig.CHANNEL chan = botconfig.CHANNEL
if var.PHASE != "join": if var.PHASE != "join":
if "join" in COMMANDS.keys(): if "join" in COMMANDS.keys():
COMMANDS["join"] = [lambda *spam: cli.msg(chan, "This command has been disabled by an admin.")] COMMANDS["join"] = [lambda *spam: cli.msg(chan, "Dit commanda is uitgeschakeld door een administrator.")]
if "start" in COMMANDS.keys(): if "start" in COMMANDS.keys():
COMMANDS["start"] = [lambda *spam: cli.msg(chan, "This command has been disabled by an admin.")] COMMANDS["start"] = [lambda *spam: cli.msg(chan, "Dit commanda is uitgeschakeld door een administrator.")]
cli.msg(chan, "Starting a new game has now been disabled by \02{0}\02.".format(nick)) cli.msg(chan, "Een nieuw spel starten is uitgeschakeld door \02{0}\02.".format(nick))
var.ADMIN_TO_PING = nick var.ADMIN_TO_PING = nick
if rest.strip(): if rest.strip():
@ -2733,9 +2732,9 @@ if botconfig.DEBUG_MODE or botconfig.ALLOWED_NORMAL_MODE_COMMANDS:
def revroles(cli, nick, chan, rest): def revroles(cli, nick, chan, rest):
if var.PHASE != "geen": if var.PHASE != "geen":
cli.msg(chan, str(var.ROLES)) cli.msg(chan, str(var.ROLES))
if var.PHASE in ('night','day'): if var.PHASE in ('nacht','dag'):
cli.msg(chan, "Cursed: "+str(var.CURSED)) cli.msg(chan, "Vervloekt: "+str(var.CURSED))
cli.msg(chan, "Gunners: "+str(list(var.GUNNERS.keys()))) cli.msg(chan, "Kanonnier: "+str(list(var.GUNNERS.keys())))
@cmd("fgame", admin_only=True) @cmd("fgame", admin_only=True)
@ -2745,16 +2744,16 @@ if botconfig.DEBUG_MODE or botconfig.ALLOWED_NORMAL_MODE_COMMANDS:
cli.notice(nick, "Er is geen spel bezig.") cli.notice(nick, "Er is geen spel bezig.")
return return
if var.PHASE != "join": if var.PHASE != "join":
cli.notice(nick, "Werewolf is already in play.") cli.notice(nick, "Weerwolven is al bezig.")
return return
if nick not in pl: if nick not in pl:
cli.notice(nick, "You're currently not playing.") cli.notice(nick, "Jij speelt nu niet mee.")
return return
rest = rest.strip().lower() rest = rest.strip().lower()
if rest: if rest:
if cgamemode(cli, *re.split(" +",rest)): if cgamemode(cli, *re.split(" +",rest)):
cli.msg(chan, ("\u0002{0}\u0002 has changed the "+ cli.msg(chan, ("\u0002{0}\u0002 heeft de spel "+
"game settings successfully.").format(nick)) "instellingen succesvol aangepast.").format(nick))
def fgame_help(args = ""): def fgame_help(args = ""):
args = args.strip() args = args.strip()
@ -2773,17 +2772,17 @@ if botconfig.DEBUG_MODE or botconfig.ALLOWED_NORMAL_MODE_COMMANDS:
def forcepm(cli, nick, chan, rest): def forcepm(cli, nick, chan, rest):
rst = re.split(" +",rest) rst = re.split(" +",rest)
if len(rst) < 2: if len(rst) < 2:
cli.msg(chan, "The syntax is incorrect.") cli.msg(chan, "De syntax is incorrect.")
return return
who = rst.pop(0).strip() who = rst.pop(0).strip()
if not who or who == botconfig.NICK: if not who or who == botconfig.NICK:
cli.msg(chan, "That won't work.") cli.msg(chan, "Dat werkt niet.")
return return
if not is_fake_nick(who): if not is_fake_nick(who):
ul = list(var.USERS.keys()) ul = list(var.USERS.keys())
ull = [u.lower() for u in ul] ull = [u.lower() for u in ul]
if who.lower() not in ull: if who.lower() not in ull:
cli.msg(chan, "This can only be done on fake nicks.") cli.msg(chan, "Dit kan alleen gedaan worden op niet bestaande nicknames.")
return return
else: else:
who = ul[ull.index(who.lower())] who = ul[ull.index(who.lower())]

Loading…
Cancel
Save