mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
Move house_balance to betutils
This commit is contained in:
parent
7347480a86
commit
75ebebc757
2 changed files with 17 additions and 17 deletions
|
@ -220,6 +220,15 @@ def RetrieveHouseBalance():
|
||||||
return
|
return
|
||||||
return unlocked_balance
|
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):
|
def ReserveBalance(link,cmd):
|
||||||
rbal=GetParam(cmd,1)
|
rbal=GetParam(cmd,1)
|
||||||
if rbal:
|
if rbal:
|
||||||
|
@ -269,3 +278,11 @@ RegisterCommand({
|
||||||
'admin': True,
|
'admin': True,
|
||||||
'help': "Set or get reserve balance (not part of the house balance)"
|
'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.redisdb import *
|
||||||
from tipbot.betutils 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):
|
def Roll(link):
|
||||||
identity=link.identity()
|
identity=link.identity()
|
||||||
try:
|
try:
|
||||||
|
@ -282,14 +273,6 @@ RegisterCommand({
|
||||||
'registered': True,
|
'registered': True,
|
||||||
'help': "resets your dice stats"
|
'help': "resets your dice stats"
|
||||||
})
|
})
|
||||||
RegisterCommand({
|
|
||||||
'module': __name__,
|
|
||||||
'name': 'house_balance',
|
|
||||||
'function': GetHouseBalance,
|
|
||||||
'admin': True,
|
|
||||||
'registered': True,
|
|
||||||
'help': "get the house balance"
|
|
||||||
})
|
|
||||||
RegisterCommand({
|
RegisterCommand({
|
||||||
'module': __name__,
|
'module': __name__,
|
||||||
'name': 'playerseed',
|
'name': 'playerseed',
|
||||||
|
|
Loading…
Reference in a new issue