This commit is contained in:
parent
cced3c49ef
commit
2d426a9f73
@ -40,13 +40,12 @@ class Server:
|
||||
parsedCommand = command.split(" ")
|
||||
if len(parsedCommand) > 3:
|
||||
self.networkInstance.sendMessage("ERROR".encode('UTF-8'))
|
||||
# TODO: Ez igy gecironda, ezt meg kene csinalni rendesen.
|
||||
elif len(parsedCommand) == 1:
|
||||
return self.execute(parsedCommand[0])
|
||||
self.execute(parsedCommand[0])
|
||||
elif len(parsedCommand) == 2:
|
||||
return self.execute(parsedCommand[0], parsedCommand[1])
|
||||
self.execute(parsedCommand[0], parsedCommand[1])
|
||||
elif len(parsedCommand) == 3:
|
||||
return self.execute(parsedCommand[0], parsedCommand[1], parsedCommand[2])
|
||||
self.execute(parsedCommand[0], parsedCommand[1], parsedCommand[2])
|
||||
|
||||
def execute(self, command: str, firstParam: str = "", secondParam: str = "") -> None:
|
||||
if self.executor.baseDir == "":
|
||||
@ -121,4 +120,5 @@ class Server:
|
||||
message = self.networkInstance.recieveMessage().decode('UTF-8')
|
||||
self.parseCommand(message)
|
||||
except Exception as e:
|
||||
self.networkInstance.sendMessage("ERROR".encode('UTF-8'))
|
||||
print(e)
|
||||
|
Loading…
Reference in New Issue
Block a user