self.bot.act_PRIVMSG(prefix.nick,".setaddr: Your address has been saved as: %s. Please verify that this is correct or your coins could be lost."%(cmd.args[1]))
defhandle_getbal(self,args,prefix,trailing,cmd):
usage=".getbal <currency>"
attr,login,rpc=self.getMods()
# Check login
ifnotlogin.check(prefix.nick,prefix.hostname):
self.bot.act_PRIVMSG(prefix.nick,".getbal: Please .login to use this command.")
self.bot.act_PRIVMSG(prefix.nick,".withdraw: Withdrawing that much would put you below the reserve (%s%s)."%(client.reserve,cmd.args[0].upper()))
self.bot.act_PRIVMSG(prefix.nick,".withdraw: The reserve is to cover network transaction fees. To recover it you must close your account. (Talk to an admin)")
return
# Check if the precision is wrong
ifnotclient.checkPrecision(withdrawamount):
self.bot.act_PRIVMSG(prefix.nick,".withdraw: %s has maximum %s decimal places"%(cmd.args[0].upper(),client.precision))
self.bot.act_PRIVMSG(prefix.nick,".withdraw: %s%s sent to %s. Transaction ID: %s"%(withdrawamount,client.name,withdrawaddr,txn))
else:
self.bot.act_PRIVMSG(prefix.nick,".withdraw: Transaction create failed. Maybe the transaction was too large for the network? Try a smaller increment.")
defhandle_getaddr(self,args,prefix,trailing,cmd):
attr,login,rpc=self.getMods()
usage=".getaddr <currency>"
attr,login,rpc=self.getMods()
# Check login
ifnotlogin.check(prefix.nick,prefix.hostname):
self.bot.act_PRIVMSG(prefix.nick,".getaddr: Please .login to use this command.")
self.bot.act_PRIVMSG(prefix.nick,"Your %s deposit address is: %s"%(cmd.args[0].upper(),walletaddr))
defhandle_curinfo(self,args,prefix,trailing,cmd):
attr,login,rpc=self.getMods()
usage=".curinfo [<currency>]"
attr,login,rpc=self.getMods()
# Check for args
iflen(cmd.args)==0:
self.bot.act_PRIVMSG(prefix.nick,".curinfo: supported currencies: %s. Use '.curinfo BTC' to see details. "%', '.join([x.upper()forxinrpc.getSupported()]))
return
else:
ifnotrpc.isSupported(cmd.args[0]):
self.bot.act_PRIVMSG(prefix.nick,".curinfo: '%s' is not a supported currency. Supported currencies are: %s"%(cmd.args[0],', '.join([x.upper()forxinrpc.getSupported()])))
return
else:
info=rpc.getInfo(cmd.args[0])
self.bot.act_PRIVMSG(prefix.nick,".curinfo: %s - %s. More info: %s"%(args[0],info["name"],info["link"]))