Advarsel for brukere med lav kreditt.

This commit is contained in:
Øystein Ingmar Skartsæterhagen 2010-11-24 16:22:10 +00:00
parent 04b7f0dfe3
commit 666c301e14
1 changed files with 5 additions and 0 deletions

View File

@ -17,6 +17,8 @@ local_help_commands = ['help!', '???']
faq_commands = ['faq'] faq_commands = ['faq']
restart_commands = ['restart'] restart_commands = ['restart']
low_credit_warning_limit = -100
class ExitMenu(Exception): class ExitMenu(Exception):
pass pass
@ -792,6 +794,9 @@ When finished, write an empty line to confirm the purchase.
self.print_purchase() self.print_purchase()
for t in self.purchase.transactions: for t in self.purchase.transactions:
print 'User %s\'s credit is now %d kr' % (t.user.name, t.user.credit) print 'User %s\'s credit is now %d kr' % (t.user.name, t.user.credit)
if t.user.credit < low_credit_warning_limit:
print ('USER %s HAS LOWER CREDIT THAN %d, AND SHOULD CONSIDER PUTTING SOME MONEY IN THE BOX.'
% (t.user.name, low_credit_warning_limit))
self.pause() self.pause()
return True return True