diff --git a/tipbot.py b/tipbot.py index de966da..f55946c 100644 --- a/tipbot.py +++ b/tipbot.py @@ -108,6 +108,9 @@ for modulename in modulenames: def GetBalance(link,cmd): nick=link.user.nick + if link.group and nick.startswith('blackbab'): + link.send_private("Stop spamming the public channel") + return try: balance,confirming = RetrieveBalance(link) sbalance = AmountToString(balance) @@ -194,7 +197,8 @@ def LinkingAccounts(link,cmd): link.send_private('any account interchangeably. If the accounts are on different networks') link.send_private('(eg, IRC and Reddit), the user names need to be prefixed with the network\'s') link.send_private('name (freenode: for Freenode IRC, reddit: for Reddit), like this:') - like.send_private(' !link_account reddit:myredditname') + link.send_private(' !link_account reddit:myredditname (do that on Freenode)') + link.send_private(' !link_account freenode:myircnick (do that on Reddit)') link.send_private('Linking accounts is irreversible, so make sure you only link to accounts') link.send_private('under your control') @@ -251,7 +255,7 @@ def Help(link,cmd): def Info(link,cmd): link.send_private("Info for %s:" % config.tipbot_name) - link.send_private("Copyright 2014,2015 moneromooo - http://duckpool.mooo.com/tipbot/") + link.send_private("Copyright 2014,2015 moneromooo - https://github.com/tippero/tippero") link.send_private("Type !help, or !commands for a list of commands") link.send_private("NO WARRANTY, YOU MAY LOSE YOUR COINS") link.send_private("By sending your %s to %s, you are giving up their control" % (coinspecs.name, config.tipbot_name)) diff --git a/tipbot/coinspecs.py b/tipbot/coinspecs.py index a6c0b76..e27d01b 100644 --- a/tipbot/coinspecs.py +++ b/tipbot/coinspecs.py @@ -16,7 +16,7 @@ coinspecs = { "atomic_units": 1e12, "denominations": [[1000000, 1, "piconero"], [1000000000, 1e6, "micronero"], [1000000000000, 1e9, "millinero"]], "address_length": [[95, 95], [106, 106]], # min/max size of addresses - "address_prefix": ['4', '9'], # allowed prefixes of addresses + "address_prefix": ['4', '8', '9', 'A'], # allowed prefixes of addresses "min_withdrawal_fee": 10000000000, "web_wallet_url": "https://mymonero.com/", # None is there's none }, diff --git a/tipbot/command_manager.py b/tipbot/command_manager.py index 0bf555b..41381c3 100644 --- a/tipbot/command_manager.py +++ b/tipbot/command_manager.py @@ -9,6 +9,7 @@ # any later version. # +import time import tipbot.config as config from tipbot.utils import * @@ -23,7 +24,7 @@ def SendToProxy(link,msg): def RunRegisteredCommand(link,ifyes,yesdata,ifno,nodata): if link.identity() not in calltable: calltable[link.identity()] = [] - calltable[link.identity()].append([link,ifyes,yesdata,ifno,nodata]) + calltable[link.identity()].append([link,ifyes,yesdata,ifno,nodata,time.time()+20]) if link.network.is_identified(link): RunNextCommand(link,True) else: @@ -58,6 +59,17 @@ def RunNextCommand(link,registered): finally: Unlock() +def PruneOldWaitingCommands(): + Lock() + now=time.time() + for identity in calltable.keys(): + while len(calltable[identity])>0 and calltable[identity][0][5]