Move house_balance to betutils

This commit is contained in:
moneromooo 2015-01-19 20:54:54 +00:00
parent 7347480a86
commit 75ebebc757
2 changed files with 17 additions and 17 deletions

View File

@ -220,6 +220,15 @@ def RetrieveHouseBalance():
return
return unlocked_balance
def GetHouseBalance(link,cmd):
try:
balance = RetrieveHouseBalance()
except Exception,e:
log_error('Failed to retrieve house balance: %s' % str(e))
link.send('An error occured')
return
link.send('House balance: %s' % AmountToString(balance))
def ReserveBalance(link,cmd):
rbal=GetParam(cmd,1)
if rbal:
@ -269,3 +278,11 @@ RegisterCommand({
'admin': True,
'help': "Set or get reserve balance (not part of the house balance)"
})
RegisterCommand({
'module': 'betting',
'name': 'house_balance',
'function': GetHouseBalance,
'admin': True,
'registered': True,
'help': "get the house balance"
})

View File

@ -24,15 +24,6 @@ from tipbot.command_manager import *
from tipbot.redisdb import *
from tipbot.betutils import *
def GetHouseBalance(link,cmd):
try:
balance = RetrieveHouseBalance()
except Exception,e:
log_error('Failed to retrieve house balance: %s' % str(e))
link.send('An error occured')
return
link.send('House balance: %s' % AmountToString(balance))
def Roll(link):
identity=link.identity()
try:
@ -282,14 +273,6 @@ RegisterCommand({
'registered': True,
'help': "resets your dice stats"
})
RegisterCommand({
'module': __name__,
'name': 'house_balance',
'function': GetHouseBalance,
'admin': True,
'registered': True,
'help': "get the house balance"
})
RegisterCommand({
'module': __name__,
'name': 'playerseed',