Skip to content

Commit

Permalink
Got rid of annoying messages and fixed shell repeating importing comm…
Browse files Browse the repository at this point in the history
…ands such as send and update
  • Loading branch information
Max00355 committed Nov 29, 2013
1 parent fe53a51 commit 0a49cba
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion send_coin.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def send(address, amount):
"plain":x['starter'],
"difficulty":x['difficulty'],
}
print out_s

send_command.send(out_s)
print "Coins sent!"

Expand Down
1 change: 0 additions & 1 deletion send_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def send(cmd, out=False, god=False):
s.close()
continue
else:
print x['ip'], str(x['port'])
s.send(json.dumps({"cmd":"get_version"}))
data = s.recv(1024)
if data == config.version:
Expand Down
7 changes: 6 additions & 1 deletion shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
import threading
import urllib
import get_db
import sys

class zc(cmd.Cmd):
prompt = "zShell$ "
intro = "Welcome to the zCoin shell, type `help` to get started."
def do_send(self, line):
self.lastcmd = ""
line = line.split()
try:
to = line[0]
Expand All @@ -18,8 +20,10 @@ def do_send(self, line):
else:
print "Coins are being sent"
threading.Thread(target=send_coin.send, args=(to, amount)).start()

print("zShell$"),

def do_check(self, lines):
self.lastcmd = ""
get_db.send()
def do_totalcoins(self, line):
coin = config.db.find("coins", "all")
Expand Down Expand Up @@ -63,6 +67,7 @@ def do_transactions(self, line):


def do_update(self, line):
self.lastcmd = ""
files = {
"check_coin.py":"https://raw.github.com/Max00355/zCoin/master/check_coin.py",
"coin_count.py":"https://raw.github.com/Max00355/zCoin/master/coin_count.py",
Expand Down

0 comments on commit 0a49cba

Please sign in to comment.