mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
Make sure to send help/etc in PM
This commit is contained in:
parent
d5d0801807
commit
54531fdc3b
5 changed files with 53 additions and 53 deletions
30
tipbot.py
30
tipbot.py
|
@ -183,24 +183,24 @@ def Help(link,cmd):
|
||||||
RunModuleHelpFunction(module,link)
|
RunModuleHelpFunction(module,link)
|
||||||
return
|
return
|
||||||
|
|
||||||
link.send("See available commands with !commands or !commands <modulename>")
|
link.send_private("See available commands with !commands or !commands <modulename>")
|
||||||
link.send("Available modules: %s" % ", ".join(GetModuleNameList(IsAdmin(link))))
|
link.send_private("Available modules: %s" % ", ".join(GetModuleNameList(IsAdmin(link))))
|
||||||
link.send("Get help on a particular module with !help <modulename>")
|
link.send_private("Get help on a particular module with !help <modulename>")
|
||||||
if coinspecs.web_wallet_url:
|
if coinspecs.web_wallet_url:
|
||||||
link.send("No %s address ? You can use %s" % (coinspecs.name, coinspecs.web_wallet_url))
|
link.send_private("No %s address ? You can use %s" % (coinspecs.name, coinspecs.web_wallet_url))
|
||||||
|
|
||||||
def Info(link,cmd):
|
def Info(link,cmd):
|
||||||
link.send("Info for %s:" % config.tipbot_name)
|
link.send_private("Info for %s:" % config.tipbot_name)
|
||||||
link.send("Copyright 2014,2015 moneromooo - http://duckpool.mooo.com/tipbot/")
|
link.send_private("Copyright 2014,2015 moneromooo - http://duckpool.mooo.com/tipbot/")
|
||||||
link.send("Type !help, or !commands for a list of commands")
|
link.send_private("Type !help, or !commands for a list of commands")
|
||||||
link.send("NO WARRANTY, YOU MAY LOSE YOUR COINS")
|
link.send_private("NO WARRANTY, YOU MAY LOSE YOUR COINS")
|
||||||
link.send("By sending your %s to %s, you are giving up their control" % (coinspecs.name, config.tipbot_name))
|
link.send_private("By sending your %s to %s, you are giving up their control" % (coinspecs.name, config.tipbot_name))
|
||||||
link.send("to whoever runs the tipbot. Any tip you make/receive using %s" % config.tipbot_name)
|
link.send_private("to whoever runs the tipbot. Any tip you make/receive using %s" % config.tipbot_name)
|
||||||
link.send("is obviously not anonymous. %s's wallet may end up corrupt, or be" % config.tipbot_name)
|
link.send_private("is obviously not anonymous. %s's wallet may end up corrupt, or be" % config.tipbot_name)
|
||||||
link.send("stolen, the server compromised, etc. While I hope this won't be the case,")
|
link.send_private("stolen, the server compromised, etc. While I hope this won't be the case,")
|
||||||
link.send("I will not offer any warranty whatsoever for the use of %s or the" % config.tipbot_name)
|
link.send_private("I will not offer any warranty whatsoever for the use of %s or the" % config.tipbot_name)
|
||||||
link.send("return of any %s. Use at your own risk." % coinspecs.name)
|
link.send_private("return of any %s. Use at your own risk." % coinspecs.name)
|
||||||
link.send("That being said, I hope you enjoy using it :)")
|
link.send_private("That being said, I hope you enjoy using it :)")
|
||||||
|
|
||||||
def InitScanBlockHeight():
|
def InitScanBlockHeight():
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -207,40 +207,40 @@ def Seeds(link,cmd):
|
||||||
link.send('Your player seed hash is %s' % str(ps))
|
link.send('Your player seed hash is %s' % str(ps))
|
||||||
|
|
||||||
def Fair(link,cmd):
|
def Fair(link,cmd):
|
||||||
link.send("%s's dice betting is provably fair" % config.tipbot_name)
|
link.send_private("%s's dice betting is provably fair" % config.tipbot_name)
|
||||||
link.send("Your rolls are determined by three pieces of information:")
|
link.send_private("Your rolls are determined by three pieces of information:")
|
||||||
link.send(" - your server seed. You can see its hash with !seeds")
|
link.send_private(" - your server seed. You can see its hash with !seeds")
|
||||||
link.send(" - your player seed. Empty by default, you can set it with !playerseed")
|
link.send_private(" - your player seed. Empty by default, you can set it with !playerseed")
|
||||||
link.send(" - the roll number, displayed with each bet you make")
|
link.send_private(" - the roll number, displayed with each bet you make")
|
||||||
link.send("To verify past rolls were fair, use !faircheck")
|
link.send_private("To verify past rolls were fair, use !faircheck")
|
||||||
link.send("You will be given your server seed, and a new one will be generated")
|
link.send_private("You will be given your server seed, and a new one will be generated")
|
||||||
link.send("for future rolls. Then follow these steps:")
|
link.send_private("for future rolls. Then follow these steps:")
|
||||||
link.send("Calculate the SHA-256 sum of serverseed:playerseed:rollnumber")
|
link.send_private("Calculate the SHA-256 sum of serverseed:playerseed:rollnumber")
|
||||||
link.send("Take the first 8 characters of this sum to make an hexadecimal")
|
link.send_private("Take the first 8 characters of this sum to make an hexadecimal")
|
||||||
link.send("number, and divide it by 0x100000000. You will end up with a number")
|
link.send_private("number, and divide it by 0x100000000. You will end up with a number")
|
||||||
link.send("between 0 and 1 which was your roll for that particular bet")
|
link.send_private("between 0 and 1 which was your roll for that particular bet")
|
||||||
link.send("See !faircode for Python code implementing this check")
|
link.send_private("See !faircode for Python code implementing this check")
|
||||||
|
|
||||||
def FairCode(link,cmd):
|
def FairCode(link,cmd):
|
||||||
link.send("This Python 2 code takes the seeds and roll number and outputs the roll")
|
link.send_private("This Python 2 code takes the seeds and roll number and outputs the roll")
|
||||||
link.send("for the corresponding game. Run it with three arguments: server seed,")
|
link.send_private("for the corresponding game. Run it with three arguments: server seed,")
|
||||||
link.send("player seed (use '' if you did not set any), and roll number.")
|
link.send_private("player seed (use '' if you did not set any), and roll number.")
|
||||||
|
|
||||||
link.send("import sys,hashlib,random")
|
link.send_private("import sys,hashlib,random")
|
||||||
link.send("try:")
|
link.send_private("try:")
|
||||||
link.send(" s=hashlib.sha256(sys.argv[1]+':'+sys.argv[2]+':'+sys.argv[3]).hexdigest()")
|
link.send_private(" s=hashlib.sha256(sys.argv[1]+':'+sys.argv[2]+':'+sys.argv[3]).hexdigest()")
|
||||||
link.send(" roll = float(long(s[0:8],base=16))/0x100000000")
|
link.send_private(" roll = float(long(s[0:8],base=16))/0x100000000")
|
||||||
link.send(" print '%.16g' % roll")
|
link.send_private(" print '%.16g' % roll")
|
||||||
link.send("except:")
|
link.send_private("except:")
|
||||||
link.send(" print 'need serverseed, playerseed, and roll number'")
|
link.send_private(" print 'need serverseed, playerseed, and roll number'")
|
||||||
|
|
||||||
def DiceHelp(link):
|
def DiceHelp(link):
|
||||||
link.send("The dice module is a provably fair %s dice betting game" % coinspecs.name)
|
link.send_private("The dice module is a provably fair %s dice betting game" % coinspecs.name)
|
||||||
link.send("Basic usage: !dice <amount> <multiplier> [over|under]")
|
link.send_private("Basic usage: !dice <amount> <multiplier> [over|under]")
|
||||||
link.send("The goal is to get a roll under (or over, at your option) a target that depends")
|
link.send_private("The goal is to get a roll under (or over, at your option) a target that depends")
|
||||||
link.send("on your chosen profit multiplier (1 for even money)")
|
link.send_private("on your chosen profit multiplier (1 for even money)")
|
||||||
link.send("See !fair and !faircode for a description of the provable fairness of the game")
|
link.send_private("See !fair and !faircode for a description of the provable fairness of the game")
|
||||||
link.send("See !faircheck to get the server seed to check past rolls were fair")
|
link.send_private("See !faircheck to get the server seed to check past rolls were fair")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -107,9 +107,9 @@ def Deposit(link,cmd):
|
||||||
Help(link)
|
Help(link)
|
||||||
|
|
||||||
def Help(link):
|
def Help(link):
|
||||||
link.send("You can send %s to your account:" % coinspecs.name);
|
link.send_private("You can send %s to your account:" % coinspecs.name);
|
||||||
link.send(" Address: %s" % GetTipbotAddress())
|
link.send_private(" Address: %s" % GetTipbotAddress())
|
||||||
link.send(" Payment ID: %s" % GetPaymentID(link))
|
link.send_private(" Payment ID: %s" % GetPaymentID(link))
|
||||||
|
|
||||||
RegisterModule({
|
RegisterModule({
|
||||||
'name': __name__,
|
'name': __name__,
|
||||||
|
|
|
@ -293,10 +293,10 @@ def RainActive(link,cmd):
|
||||||
return
|
return
|
||||||
|
|
||||||
def Help(link):
|
def Help(link):
|
||||||
link.send('You can tip other people, or rain %s on them' % coinspecs.name)
|
link.send_private('You can tip other people, or rain %s on them' % coinspecs.name)
|
||||||
link.send('!tip tips a single person, while !rain shares equally between people in the channel')
|
link.send_private('!tip tips a single person, while !rain shares equally between people in the channel')
|
||||||
link.send('!rainactive tips all within the last N hours, with more recently active people')
|
link.send_private('!rainactive tips all within the last N hours, with more recently active people')
|
||||||
link.send('getting a larger share.')
|
link.send_private('getting a larger share.')
|
||||||
|
|
||||||
|
|
||||||
RegisterModule({
|
RegisterModule({
|
||||||
|
|
|
@ -141,8 +141,8 @@ def Withdraw(link,cmd):
|
||||||
def Help(link):
|
def Help(link):
|
||||||
fee = config.withdrawal_fee or coinspecs.min_withdrawal_fee
|
fee = config.withdrawal_fee or coinspecs.min_withdrawal_fee
|
||||||
min_amount = config.min_withdraw_amount or fee
|
min_amount = config.min_withdraw_amount or fee
|
||||||
link.send("Minimum withdrawal: %s" % AmountToString(min_amount))
|
link.send_private("Minimum withdrawal: %s" % AmountToString(min_amount))
|
||||||
link.send("Withdrawal fee: %s" % AmountToString(fee))
|
link.send_private("Withdrawal fee: %s" % AmountToString(fee))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue