Skip to content

Commit 32a6815

Browse files
committed
Show Command
1 parent 98df2d4 commit 32a6815

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

c.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ def color(i):
8787
elif "<ping>" in text:
8888
lastPing = datetime.now()
8989
so.sendall(hashData(str(text)))
90+
elif "<show>" in text:
91+
so.sendall(hashData(str(text)))
9092
elif "<help>" in text:
9193
print "---------------------------------------------------------"
9294
print "|The following commands can be used in this application.|"
@@ -120,7 +122,6 @@ def color(i):
120122
so.sendall(hashData(str(text)))
121123
else:
122124
so.sendall(hashData(str('<chat>'+nickname+'~'+text+'</chat>')))
123-
124125
# writeToJsonFile(path,fileName,text)
125126

126127

s.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,18 @@ def parseInput(data, con):
119119
elif "<date>" in data:
120120
date=strftime("%a, %d %b %Y", gmtime())
121121
con.send(hashData(messageInfo(str(date))))
122+
elif "<show>" in data:
123+
first_msg = buffer.split(":")
124+
show = "\n".join(str(x) for x in first_msg)
125+
print buffer
126+
print show
127+
con.send(hashData(messageInfo(show)))
122128
elif "<newclient " in data: #<newclient Daniel>
123129
tagless = data[1:-1]
124130
splitMessage = tagless.split(' ')
125131
command = splitMessage[0]
126132
newclient = splitMessage[1]
127133
usernameTaken = 0
128-
129134
for k,v in clients.items():
130135
if k == newclient:
131136
print "Username taken."

0 commit comments

Comments
 (0)