File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,8 @@ def color(i):
87
87
elif "<ping>" in text :
88
88
lastPing = datetime .now ()
89
89
so .sendall (hashData (str (text )))
90
+ elif "<show>" in text :
91
+ so .sendall (hashData (str (text )))
90
92
elif "<help>" in text :
91
93
print "---------------------------------------------------------"
92
94
print "|The following commands can be used in this application.|"
Original file line number Diff line number Diff line change @@ -122,9 +122,13 @@ def parseInput(data, con):
122
122
date = strftime ("%a, %d %b %Y" , gmtime ())
123
123
con .send (hashData (messageInfo (str (date ))))
124
124
elif "<show>" in data :
125
+ count = buffer .count (":" )
126
+ count = str (count )
125
127
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 ))
128
132
elif "<newclient " in data : #<newclient Daniel>
129
133
tagless = data [1 :- 1 ]
130
134
splitMessage = tagless .split (' ' )
You can’t perform that action at this time.
0 commit comments