Fix column obsession

This commit is contained in:
panicbit 2018-10-11 01:26:16 +02:00
parent f8fb422cbd
commit c1495e9c1f

View file

@ -168,16 +168,22 @@ class Module(object):
if win: if win:
event["user"].set_setting("coins", str(user_coins+coin_bet)) event["user"].set_setting("coins", str(user_coins+coin_bet))
event["stdout"].write("%s flips %s and wins %s coin%s! (new total: %s)" % ( event["stdout"].write(
event["user"].nickname, side_name, coin_bet_str, "%s flips %s and wins %s coin%s! (new total: %s)" % (
"" if coin_bet == 1 else "s", event["user"].nickname, side_name, coin_bet_str,
user_coins+coin_bet)) "" if coin_bet == 1 else "s",
user_coins+coin_bet
)
)
else: else:
event["user"].set_setting("coins", str(user_coins-coin_bet)) event["user"].set_setting("coins", str(user_coins-coin_bet))
event["stdout"].write("%s flips %s and loses %s coin%s! (new total: %s)" % ( event["stdout"].write(
event["user"].nickname, side_name, coin_bet_str, "%s flips %s and loses %s coin%s! (new total: %s)" % (
"" if coin_bet == 1 else "s", event["user"].nickname, side_name, coin_bet_str,
user_coins-coin_bet)) "" if coin_bet == 1 else "s",
user_coins-coin_bet
)
)
@utils.hook("received.command.sendcoins", min_args=2, authenticated=True) @utils.hook("received.command.sendcoins", min_args=2, authenticated=True)
def send(self, event): def send(self, event):