From 209eb76b2788ccb08793f66eb269309d1564f934 Mon Sep 17 00:00:00 2001 From: moneromooo Date: Thu, 8 Jan 2015 15:08:28 +0000 Subject: [PATCH] Add a deposit command to the payment module It makes it easier to find out how to deposit, since the payment had no commands, and thus was not included in the modules list when !commands was used --- tipbot/modules/payment.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tipbot/modules/payment.py b/tipbot/modules/payment.py index 8898464..f4f4417 100644 --- a/tipbot/modules/payment.py +++ b/tipbot/modules/payment.py @@ -104,6 +104,9 @@ def UpdateCoin(param): log_error('UpdateCoin: Failed to get bulk payments: %s' % str(e)) last_wallet_update_time = time.time() +def Deposit(nick,chan,cmd): + Help(nick,chan) + def Help(nick,chan): SendTo(nick, "You can send %s to your account:" % coinspecs.name); SendTo(nick, " Address: %s" % GetTipbotAddress()) @@ -113,5 +116,12 @@ RegisterModule({ 'name': __name__, 'help': Help, }) +RegisterCommand({ + 'module': __name__, + 'name': 'deposit', + 'function': Deposit, + 'admin': True, + 'help': "Show instructions about depositing %s" % coinspecs.name +}) RegisterIdleFunction(__name__,UpdateCoin)