--- deliantra/server/ext/bank.ext 2008/05/02 16:16:02 1.6 +++ deliantra/server/ext/bank.ext 2009/09/02 00:05:56 1.9 @@ -57,11 +57,11 @@ my $pay = $amount * $coin->value; # First check for possible overflow and user stupidity - if ($amount > 2**30) { - return "Sorry, we do not handle that kind of money for one $action."; - } elsif ($amount == 0) { + if ($pay > 2**30) { + return "Sorry, we do not handle that amount of money for one $action."; + } elsif ($pay == 0) { return "You can not $action nothing."; - } elsif ($amount < 0) { + } elsif ($pay < 0) { return "You can not $action negative values."; } @@ -92,6 +92,7 @@ if ($command eq "") { return "You can: + deposit withdraw balance @@ -107,19 +108,19 @@ return "I can tell you how much money you are saving in our bank, just ask me about your balance."; } elsif ($command eq "rates") { my @coins = cf::coin_archetypes; - my $exchange_rates = "Here is a list of exchange rates:\n\n\n"; + my $exchange_rates = "Here is a list of exchange rates:\n\n"; for my $f (0 .. $#coins) { for my $t ($f + 1 .. $#coins) { $exchange_rates .= - sprintf "One %s is %d %s.\n\n", + sprintf " One %s is %d %s.\n", $coins[$f]->name, (calc_exchange_rate 1, $coins[$f], $coins[$t]), $coins[$t]->name_pl; } } - return "$exchange_rates\n\nThis may change a bit with the stock markets but don't expect it to be much."; + return "$exchange_rates\nThis may change a bit with the stock markets but don't expect it to be much."; } }