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