|
@@ -68,16 +68,12 @@ class ConnHandlerBeeWatch(digilib.network.ConnHandlerBase):
|
|
|
"turn":self.engines_ctrl.turn
|
|
|
}
|
|
|
|
|
|
- def handle(self, data_decoded):
|
|
|
+ def handle(self, data):
|
|
|
data_decoded=data_decoded.strip()
|
|
|
# lchat.info("Client:"+data_decoded)
|
|
|
- if data_decoded.find(" ") != -1:
|
|
|
- cmd = data_decoded.split()[0]
|
|
|
- args = data_decoded.split()[1:]
|
|
|
- else:
|
|
|
- cmd=data_decoded
|
|
|
- args = ()
|
|
|
- kwargs = {"args":args,"command":command,"respond":self.respond}
|
|
|
+ data = data.split(" ")
|
|
|
+ cmd,*args = data
|
|
|
+ kwargs = {"args":args,"command":cmd,"respond":self.respond}
|
|
|
func = beewatch._commands.get(name,False)
|
|
|
if func == False:
|
|
|
self.respond("Unknown command")
|