Distinction between a and an

This commit is contained in:
Ominous 2014-12-09 00:17:33 -05:00
parent 906e181f16
commit 0f6ee5c994
2 changed files with 7 additions and 5 deletions

View File

@ -2265,7 +2265,9 @@ def leave_game(cli, nick, chan, rest):
cli.notice(nick, "You're not currently playing.") cli.notice(nick, "You're not currently playing.")
return return
if var.get_role(nick) != "person" and var.ROLE_REVEAL: if var.get_role(nick) != "person" and var.ROLE_REVEAL:
lmsg = random.choice(var.QUIT_MESSAGES_RROLE).format(nick, var.get_reveal_role(nick), population) role = var.get_reveal_role(nick)
an = "n" if role[0] in ("a", "e", "i", "o", "u") else ""
lmsg = random.choice(var.QUIT_MESSAGES_RROLE).format(nick, an, var.get_reveal_role(nick), population)
cli.msg(botconfig.CHANNEL, lmsg) cli.msg(botconfig.CHANNEL, lmsg)
var.LOGGER.logMessage(("{0}, a {1}, has died of an unknown disease.").format(nick, var.get_reveal_role(nick))) var.LOGGER.logMessage(("{0}, a {1}, has died of an unknown disease.").format(nick, var.get_reveal_role(nick)))
else: else:

View File

@ -198,10 +198,10 @@ QUIT_MESSAGES = ("\u0002{0}\u0002 suddenly falls over dead before the astonished
"A pack of wild animals sets upon \u0002{0}\u0002. Soon they are only a pile of bones and a lump in the beasts' stomaches.", "A pack of wild animals sets upon \u0002{0}\u0002. Soon they are only a pile of bones and a lump in the beasts' stomaches.",
"\u0002{0}\u0002 fell off the roof of their house and is now dead.", "\u0002{0}\u0002 fell off the roof of their house and is now dead.",
"\u0002{0}\u0002 is crushed to death by a falling tree. The villagers desperately try to save them, but it is too late.") "\u0002{0}\u0002 is crushed to death by a falling tree. The villagers desperately try to save them, but it is too late.")
QUIT_MESSAGES_RROLE = ("\u0002{0}\u0002, a \u0002{1}\u0002, suddenly falls over dead before the astonished villagers.", QUIT_MESSAGES_RROLE = ("\u0002{0}\u0002, a{1} \u0002{2}\u0002, suddenly falls over dead before the astonished villagers.",
"A pack of wild animals sets upon \u0002{0}\u0002. Soon the \u0002{1}\u0002 is only a pile of bones and a lump in the beasts' stomaches.", "A pack of wild animals sets upon \u0002{0}\u0002. Soon the \u0002{2}\u0002 is only a pile of bones and a lump in the beasts' stomaches.",
"\u0002{0}\u0002, a \u0002{1}\u0002, fell off the roof of their house and is now dead.", "\u0002{0}\u0002, a{1} \u0002{2}\u0002, fell off the roof of their house and is now dead.",
"\u0002{0}\u0002 is crushed to death by a falling tree. The villagers desperately try to save the \u0002{1}\u0002, but it is too late.") "\u0002{0}\u0002 is crushed to death by a falling tree. The villagers desperately try to save the \u0002{2}\u0002, but it is too late.")
import botconfig, fnmatch import botconfig, fnmatch