Commit graph

227 commits

Author SHA1 Message Date
moneromooo
29dcb74ef3 blackjack: fix exception in insurance command error path 2015-02-12 15:38:02 +00:00
moneromooo
4da435b9d2 Add pinata module 2015-02-11 19:39:12 +00:00
moneromooo
f99f10d56c Add a Twitter module
Only acts on @tipperome @other +amount, as 140 characters only
2015-02-11 18:42:41 +00:00
moneromooo
051a0d3d86 withdraw: catch lack of parameter for !resolve 2015-02-11 18:42:41 +00:00
moneromooo
4dd13feef6 withdraw: OpenAlias support 2015-02-10 00:00:30 +00:00
moneromooo
184476409c reddit: ignore authorless messages 2015-02-09 20:02:26 +00:00
moneromooo
95ad92bc3e blackjack: fix balance checks on multiple hands 2015-02-09 09:59:14 +00:00
moneromooo
490b6304da reddit: fix command splitting creating empty tokens 2015-02-07 22:40:28 +00:00
moneromooo
5de54e005c irc: fix command splitting creating empty tokens 2015-02-07 22:40:08 +00:00
moneromooo
7b90901049 Fix double counting of overall game stats 2015-02-07 19:06:42 +00:00
moneromooo
db727c9329 Catch invalid network names in IdentityFromString/LinkAccounts 2015-02-07 10:01:13 +00:00
moneromooo
3e88744e3b Accounts can now be linked 2015-02-06 20:19:00 +00:00
moneromooo
f41763478a reddit: PMs now don't need the keyword to be parsed 2015-02-06 19:37:25 +00:00
moneromooo
b1373c629c Add a reddit network 2015-02-06 11:11:14 +00:00
moneromooo
e8954211a3 redis: add llen/lset trampolines 2015-02-05 21:42:13 +00:00
moneromooo
b0684fb81e network: add some missing self parameters 2015-02-05 21:42:04 +00:00
moneromooo
9f362e7858 Make the lock recursive
This fixes !isregistered, which piggybacks onto RunRegisteredCommand
2015-02-05 21:41:46 +00:00
moneromooo
8ff236176d Lock commands execution
So they can be used by separate threads
2015-02-05 19:34:04 +00:00
moneromooo
79de30a5dd irc: add a few more missing lowercase nick conversions 2015-02-05 09:56:10 +00:00
moneromooo
b5b775e90c withdraw: add support for payment id 2015-02-02 20:44:26 +00:00
moneromooo
c8b6ade388 Add a payment id format checker 2015-02-02 20:44:26 +00:00
moneromooo
1e29558c5e withdraw: fix balances/account mismatch 2015-02-02 20:43:17 +00:00
moneromooo
b876f1e523 withdraw: fix missing update to DisableWithdraw's parameter list 2015-02-02 20:42:24 +00:00
moneromooo
5a09316af1 tipping: import user and link 2015-02-02 19:23:55 +00:00
moneromooo
6760756d11 payment: fix copy/paste error in moving to accounts 2015-02-02 17:48:37 +00:00
moneromooo
d455985552 Use decimal functions to read amounts/units from string inputs 2015-02-02 13:11:52 +00:00
moneromooo
8a81397a84 rainactive: fix issue with link objects not usable as keys in a dict 2015-02-01 15:51:08 +00:00
moneromooo
b181b19c16 withdraw: fix network/withdraw fee mismatch 2015-02-01 12:46:49 +00:00
moneromooo
b19be42379 bookie: fix typo in minimum winnings code 2015-02-01 11:36:11 +00:00
moneromooo
b07bb7ba6b Balances now belong to accounts, and identities map to an account 2015-02-01 11:36:05 +00:00
moneromooo
333c90d46a Add a couple more commands to ignore for hegemoOn's new bot 2015-01-31 23:07:00 +00:00
moneromooo
f8bb34ec44 Remove useless IdentityFromString
Not only it was useless, but it broke the overall/since reset stats
2015-01-31 19:56:01 +00:00
moneromooo
14b70927c6 bookie: whitespace fix 2015-01-31 19:15:14 +00:00
moneromooo
2a650ff5fe bookie: make an error more informative 2015-01-31 19:14:48 +00:00
moneromooo
f99d86ecab bookie: allow duplicate event names, and specifying an event by its id 2015-01-31 19:12:32 +00:00
moneromooo
6ce78e20fb bookie: factor the optional book code 2015-01-31 19:00:01 +00:00
moneromooo
dd4b45cd41 bookie: more compact book listing 2015-01-31 19:00:00 +00:00
moneromooo
c866a1b74f dice: fix the tiniest bias
Max value from the hash is 0xffffffff, not 0x100000000
2015-01-31 18:59:57 +00:00
moneromooo
7cdff67421 AmountToString should now display without floating point inaccuracies 2015-01-31 12:19:56 +00:00
moneromooo
407f612be3 bookie: fix typo in help message construction 2015-01-31 12:12:18 +00:00
moneromooo
fe05261d7c Some more nick canonicalization 2015-01-31 09:42:07 +00:00
moneromooo
7b95991248 Use a site games salt, and use more random bits for the server seed 2015-01-30 18:27:34 +00:00
moneromooo
c03f518b96 Canonicalize nicks
For IRC, this mean case insensitivity
2015-01-30 18:13:52 +00:00
moneromooo
a7ac4f8b1c irc: remove + (voice) prefix from nicks 2015-01-29 22:58:26 +00:00
moneromooo
0d7979fc3f irc: increase the max backoff delay a bit
Freenode still throttles from time to time
2015-01-29 22:54:36 +00:00
moneromooo
73a3bd91bd bookie: compare new bet amount with total for player, not the whole book 2015-01-29 20:17:25 +00:00
moneromooo
0e144e14b3 Move some more IRC configuration to network_config 2015-01-28 13:44:56 +00:00
moneromooo
00b742445e bookie: ensure a winner player never gets less than his/her bet
This could conceivably happen in a game where one side bets a lot
more than the other side.
2015-01-27 22:13:11 +00:00
moneromooo
e2787cc2b3 bookie: book/net now available to non admin 2015-01-27 21:31:50 +00:00
moneromooo
1a67be15b0 Rename config.py to config.py.example
To help lessen conflict issues
2015-01-27 21:00:01 +00:00
moneromooo
9d104183fb Add bookie module 2015-01-27 14:43:00 +00:00
moneromooo
1d3f650bba Starting networks is now via command line, and parameterized 2015-01-26 22:59:23 +00:00
moneromooo
50455a0d08 Keep track of funds awaiting confirmation 2015-01-26 18:01:21 +00:00
moneromooo
d270ca14f9 payment: handle unlock time properly
Hopefully (untested). A high unlock time increases the number of
confirmations required to match.
2015-01-25 23:14:52 +00:00
moneromooo
eac4dad075 redis: add a trampoline for sismember 2015-01-25 23:14:36 +00:00
moneromooo
5774f1ca90 blackjack: fix basic strategy claiming split with more than two cards 2015-01-25 22:09:33 +00:00
moneromooo
9f5992c1ea Allow forcing refresh of the tipbot balance 2015-01-25 21:35:34 +00:00
moneromooo
0ab24f9e86 payment: mention the number of confirmations needed for deposit 2015-01-25 21:25:46 +00:00
moneromooo
ee7fa9172b Cache tipbot balance for a time to avoid bottleneck 2015-01-25 21:16:30 +00:00
moneromooo
69582695f6 Save stats/zstats per network 2015-01-25 20:53:35 +00:00
moneromooo
fc45df4a8c payment: rejig received payment logs to be more useful 2015-01-25 20:15:53 +00:00
moneromooo
55ec6907d3 Wait for some number of confirmations before acting on a deposit 2015-01-25 18:36:17 +00:00
moneromooo
1ad4474315 Remove stray extra space in message 2015-01-25 18:31:22 +00:00
moneromooo
099981b832 Make another JSON reply log on a single line 2015-01-25 18:31:02 +00:00
moneromooo
c096f9d6e3 irc: remove ping log 2015-01-25 17:16:21 +00:00
moneromooo
4b0d855eb0 Log received JSON as a single line to avoid spamming logs too much 2015-01-25 17:13:03 +00:00
moneromooo
fb465b70cc payment: remove an uninteresting periodic log 2015-01-25 17:12:21 +00:00
moneromooo
fb02c61653 dice: min/max multipliers are now configurable 2015-01-25 12:36:04 +00:00
moneromooo
dea535dd17 Link: cache identity 2015-01-25 12:29:50 +00:00
moneromooo
08bfb84183 RetrieveHouseBalance: Don't hit redis for data we already have 2015-01-25 12:26:41 +00:00
moneromooo
32ab6a3127 blackjack: fix splitting on different 10 valued card
It was using the first card twice, which wasn't quite correct,
tough only cosmetic
2015-01-24 21:52:24 +00:00
moneromooo
a6d4f07eec dice, blackjack: use the configured coin name in help 2015-01-24 16:58:14 +00:00
moneromooo
15c5d31dc7 payment: GetTipbotAddress now returns None when it fails
The display function will turn it into "ERROR"
2015-01-24 11:37:19 +00:00
moneromooo
d5ab3b88f5 Split GetBalance to a core RetrieveBalance and the user command 2015-01-24 11:37:18 +00:00
moneromooo
2cb01954d4 Fix report mixing up win/loss, and make it a bit more compact 2015-01-23 11:37:26 +00:00
moneromooo
bb7d4c9f2c blackjack: fix double doubling the wrong bet amount
It would double the current full amount bet, rather than the
original bet of the current hand only.

Also fix an error message using a variable before it's initialized
when telling the player his/her balance is not enough when doing so.
2015-01-23 10:52:32 +00:00
moneromooo
1a6476d2f0 Make idle and cleanup functions fields of the module object 2015-01-22 19:30:28 +00:00
moneromooo
9ab5db39e4 betutils: move "does not have enough balance" from error to warning 2015-01-22 18:46:23 +00:00
moneromooo
cf122d032b Factor player balance check into IsBetValid and make min/max bets optional 2015-01-22 18:46:15 +00:00
moneromooo
6d1136b459 betutils: add a report command for a games activity overview 2015-01-22 18:20:51 +00:00
moneromooo
c4fbd04532 redis: add trampolines for a few z* functions 2015-01-22 18:20:35 +00:00
moneromooo
4b6f08d2a1 blackjack: avoid deleting player state twice when winning insurance 2015-01-22 10:50:53 +00:00
moneromooo
e0da99eb63 blackjack: fix syntax error in error log on missing basic strategy combination 2015-01-22 10:02:46 +00:00
moneromooo
ab26278828 blackjack: add missing 21 basic strategy score
It was only implied in the tables
2015-01-22 10:02:10 +00:00
moneromooo
e0cd953dd4 Fix a few s/identity/nick/ in user facing messages 2015-01-21 22:00:22 +00:00
moneromooo
c48428b0ab blackjack: fix balance check with side bets 2015-01-21 19:44:54 +00:00
moneromooo
b040600947 Blackjack is now not admin only 2015-01-21 19:18:56 +00:00
moneromooo
84f550a355 Add ban/unban commands 2015-01-21 18:26:48 +00:00
moneromooo
efcfc84c69 Add blackjack module 2015-01-21 16:38:59 +00:00
moneromooo
19e8aa1b1c Add the ability for games to earmark part of the house balance
This allows games to take bets from players (so the players aren't
in control of them anymore) while still not counting these as part
of the house balance (and thus the house can't spend them on some
other payment).
2015-01-21 14:32:13 +00:00
moneromooo
69d0f89549 Add the tipbot's personal balance when querying house balance
It's not part of the "spendable" house balance, so must be
accounted for separately.
2015-01-21 14:32:12 +00:00
moneromooo
1726d85d5c Add a list of invalid commands to ignore
To avoid the botspam when someone's using another bot
2015-01-21 13:50:31 +00:00
moneromooo
e893d293f0 Silence the log spam from RetrieveHouseBalance 2015-01-21 10:49:06 +00:00
moneromooo
590b9ef9c5 Bypass potential loss checking code if potential loss is 0 2015-01-20 19:52:10 +00:00
moneromooo
b06520e1ea dice: fix typo in message 2015-01-20 18:00:02 +00:00
moneromooo
54531fdc3b Make sure to send help/etc in PM 2015-01-20 17:18:15 +00:00
moneromooo
d5d0801807 Fix another issue with IPv6 users - commands being ignored 2015-01-20 17:11:56 +00:00
moneromooo
92bf49a4c4 RainActive: aesthetic message fixes 2015-01-20 14:56:41 +00:00
moneromooo
1925f1e704 RainActive: fix format string error 2015-01-20 14:52:20 +00:00
moneromooo
866c1f485c Time based stats are now daily and (all time) hourly
Cuts down on unnecessary detail/storage
2015-01-20 08:41:18 +00:00