Skip to content

Commit c8117ed

Browse files
committed
2 parents 0f69929 + 343606d commit c8117ed

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

c.py

Lines changed: 2 additions & 0 deletions
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.|"

s.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,13 @@ def parseInput(data, con):
122122
date=strftime("%a, %d %b %Y", gmtime())
123123
con.send(hashData(messageInfo(str(date))))
124124
elif "<show>" in data:
125+
count = buffer.count(":")
126+
count = str(count)
125127
first_msg = buffer.split(":")
126-
show = "\n".join(str(x) for x in first_msg)
127-
con.send(hashData(messageInfo(show)))
128+
show = " - ".join(str(x) for x in first_msg)
129+
show = "there are "+ count +" previous messages " + show
130+
print show
131+
con.send(hashData(show))
128132
elif "<newclient " in data: #<newclient Daniel>
129133
tagless = data[1:-1]
130134
splitMessage = tagless.split(' ')

0 commit comments

Comments
 (0)