Move house_balance to betutils
This commit is contained in:
parent
7347480a86
commit
75ebebc757
|
@ -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"
|
||||
})
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue