def printnetworkhash(s): url = 'http://fedoracore.x64.me/index.php?page=api&action=public' resp = requests.get(url=url) stats = json.loads(resp.content) connection.send_channel( s, "The current network hashrate is %s M/s" % (int(stats['network_hashrate']) / 1000000))
def printblockcount(s): url = 'http://fedorachain.info/chain/Fedora/q/getblockcount' block = requests.get(url=url).content connection.send_channel(s, block)
def tips(s): connection.send_channel(s, "Please send your tips to:") connection.send_channel(s, "ELucyYgmNsEa12wrZYnhtvwuRPWcDomxsF.")
def credits(s): connection.send_channel(s, "My creator is Cephon!")
def printaddressbalance(s, address): url = ("http://fedorachain.info/chain/Fedora/q/addressbalance/%s" % (address.rstrip())) balance = requests.get(url=url).content connection.send_channel(s, balance)
def tips(s): connection.send_channel(s, "Please send your tips to:") connection.send_channel(s, "EM2CUbsmB5wLqDfd5ji71DAWo7mryXEo2U.") connection.send_channel(s, "or EXyrAaLMj8wEDx5oWvZKvKfN4ciH2YN4jj")
def list(s): connection.send_channel(s, "These are the main bot comamnds:") connection.send_channel(s, "\t!hashrate: Shows the current network hashrate") connection.send_channel(s, "\t!pools: Shows currently active pools (maintained by Cephon)") connection.send_channel(s, "\t!getblockcount: Shows the current block number") connection.send_channel(s, "\t!getdifficulty: Shows the current difficulty") connection.send_channel(s, "\t!addressbalance <address> Gets the current (confirmed) balance of an address") connection.send_channel(s, "\t!exchanges: Shows the current worth of 1 TIP in USD") connection.send_channel(s, "\t!settopic: Tell everyone in the channel what's on your mind") connection.send_channel(s, "\t!credits: Find out who made this bot!") connection.send_channel(s, "\t!tip: Show the address to tip us at!")
def list(s): connection.send_channel(s, "These are the main bot comamnds:") connection.send_channel(s, "\t!leetmeter: See how l33t you are.") connection.send_channel(s, "\t!hello: Say hello to me!") connection.send_channel(s, "\t!credits: Find out who made this bot!") connection.send_channel(s, "\t!tip: Show the address to tip me at!")
def printexchanges(s): connection.send_channel(s, "You can't put a price on euphoria.")
def printaddressbalance(s,address): url = ("http://fedorachain.info/chain/Fedora/q/addressbalance/%s" % (address.rstrip())) balance = requests.get(url=url).content connection.send_channel(s, balance)
def printdifficulty(s): url = 'http://fedorachain.info/chain/Fedora/q/getdifficulty' diff = requests.get(url=url).content connection.send_channel(s, diff)
def credits(s): connection.send_channel(s, "My creators are Cephon and icanprogram!")
def greet(s, user): connection.send_channel(s, "Hello, " + user + "!")
def leet(s): connection.send_channel(s, "You are " + str(randint(1,100)) + "% leet!")
def myst(s): connection.send_channel(s, "Sawg - MystPhysX 2013")
def list(s): connection.send_channel(s, "These are the main bot comamnds:") connection.send_channel(s, "\t!hashrate: Shows the current network hashrate") connection.send_channel( s, "\t!pools: Shows currently active pools (maintained by Cephon)") connection.send_channel( s, "\t!getblockcount: Shows the current block number") connection.send_channel(s, "\t!getdifficulty: Shows the current difficulty") connection.send_channel( s, "\t!addressbalance <address> Gets the current (confirmed) balance of an address" ) connection.send_channel( s, "\t!exchanges: Shows the current worth of 1 TIP in USD") connection.send_channel( s, "\t!settopic: Tell everyone in the channel what's on your mind") connection.send_channel(s, "\t!credits: Find out who made this bot!") connection.send_channel(s, "\t!tip: Show the address to tip us at!")
def printnetworkhash(s): url = 'http://fedoracore.x64.me/index.php?page=api&action=public' resp = requests.get(url=url) stats = json.loads(resp.content) connection.send_channel(s, "The current network hashrate is %s M/s" % (int(stats['network_hashrate'])/1000000))