Make sure to send help/etc in PM

This commit is contained in:
moneromooo 2015-01-20 17:18:15 +00:00
parent d5d0801807
commit 54531fdc3b
5 changed files with 53 additions and 53 deletions

View file

@ -207,40 +207,40 @@ def Seeds(link,cmd):
link.send('Your player seed hash is %s' % str(ps))
def Fair(link,cmd):
link.send("%s's dice betting is provably fair" % config.tipbot_name)
link.send("Your rolls are determined by three pieces of information:")
link.send(" - 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(" - the roll number, displayed with each bet you make")
link.send("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("for future rolls. Then follow these steps:")
link.send("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("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("See !faircode for Python code implementing this check")
link.send_private("%s's dice betting is provably fair" % config.tipbot_name)
link.send_private("Your rolls are determined by three pieces of information:")
link.send_private(" - your server seed. You can see its hash with !seeds")
link.send_private(" - your player seed. Empty by default, you can set it with !playerseed")
link.send_private(" - the roll number, displayed with each bet you make")
link.send_private("To verify past rolls were fair, use !faircheck")
link.send_private("You will be given your server seed, and a new one will be generated")
link.send_private("for future rolls. Then follow these steps:")
link.send_private("Calculate the SHA-256 sum of serverseed:playerseed:rollnumber")
link.send_private("Take the first 8 characters of this sum to make an hexadecimal")
link.send_private("number, and divide it by 0x100000000. You will end up with a number")
link.send_private("between 0 and 1 which was your roll for that particular bet")
link.send_private("See !faircode for Python code implementing this check")
def FairCode(link,cmd):
link.send("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("player seed (use '' if you did not set any), and roll number.")
link.send_private("This Python 2 code takes the seeds and roll number and outputs the roll")
link.send_private("for the corresponding game. Run it with three arguments: server seed,")
link.send_private("player seed (use '' if you did not set any), and roll number.")
link.send("import sys,hashlib,random")
link.send("try:")
link.send(" 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(" print '%.16g' % roll")
link.send("except:")
link.send(" print 'need serverseed, playerseed, and roll number'")
link.send_private("import sys,hashlib,random")
link.send_private("try:")
link.send_private(" s=hashlib.sha256(sys.argv[1]+':'+sys.argv[2]+':'+sys.argv[3]).hexdigest()")
link.send_private(" roll = float(long(s[0:8],base=16))/0x100000000")
link.send_private(" print '%.16g' % roll")
link.send_private("except:")
link.send_private(" print 'need serverseed, playerseed, and roll number'")
def DiceHelp(link):
link.send("The dice module is a provably fair %s dice betting game" % coinspecs.name)
link.send("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("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("See !faircheck to get the server seed to check past rolls were fair")
link.send_private("The dice module is a provably fair %s dice betting game" % coinspecs.name)
link.send_private("Basic usage: !dice <amount> <multiplier> [over|under]")
link.send_private("The goal is to get a roll under (or over, at your option) a target that depends")
link.send_private("on your chosen profit multiplier (1 for even money)")
link.send_private("See !fair and !faircode for a description of the provable fairness of the game")
link.send_private("See !faircheck to get the server seed to check past rolls were fair")