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.|"
@@ -120,7 +122,6 @@ def color(i):
120
122
so .sendall (hashData (str (text )))
121
123
else :
122
124
so .sendall (hashData (str ('<chat>' + nickname + '~' + text + '</chat>' )))
123
-
124
125
# writeToJsonFile(path,fileName,text)
125
126
126
127
Original file line number Diff line number Diff line change @@ -119,13 +119,18 @@ def parseInput(data, con):
119
119
elif "<date>" in data :
120
120
date = strftime ("%a, %d %b %Y" , gmtime ())
121
121
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 )))
122
128
elif "<newclient " in data : #<newclient Daniel>
123
129
tagless = data [1 :- 1 ]
124
130
splitMessage = tagless .split (' ' )
125
131
command = splitMessage [0 ]
126
132
newclient = splitMessage [1 ]
127
133
usernameTaken = 0
128
-
129
134
for k ,v in clients .items ():
130
135
if k == newclient :
131
136
print "Username taken."
You can’t perform that action at this time.
0 commit comments