bumb network version for new command processing
This commit is contained in:
		
							parent
							
								
									69535d78ca
								
							
						
					
					
						commit
						d9e4bd1ab0
					
				| 
						 | 
					@ -765,7 +765,7 @@ async def server_auth(ctx: Context, password_requested):
 | 
				
			||||||
    ctx.awaiting_rom = False
 | 
					    ctx.awaiting_rom = False
 | 
				
			||||||
    ctx.auth = ctx.rom.copy()
 | 
					    ctx.auth = ctx.rom.copy()
 | 
				
			||||||
    await send_msgs(ctx.socket, [['Connect', {
 | 
					    await send_msgs(ctx.socket, [['Connect', {
 | 
				
			||||||
        'password': ctx.password, 'rom': ctx.auth, 'version': [1, 2, 0], 'tags': get_tags(ctx)
 | 
					        'password': ctx.password, 'rom': ctx.auth, 'version': [1, 3, 0], 'tags': get_tags(ctx)
 | 
				
			||||||
    }]])
 | 
					    }]])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
async def console_input(ctx : Context):
 | 
					async def console_input(ctx : Context):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -173,7 +173,7 @@ async def on_client_connected(ctx: Context, client: Client):
 | 
				
			||||||
        # tags are for additional features in the communication.
 | 
					        # tags are for additional features in the communication.
 | 
				
			||||||
        # Name them by feature or fork, as you feel is appropriate.
 | 
					        # Name them by feature or fork, as you feel is appropriate.
 | 
				
			||||||
        'tags': ['Berserker'],
 | 
					        'tags': ['Berserker'],
 | 
				
			||||||
        'version': [1, 2, 0]
 | 
					        'version': [1, 3, 0]
 | 
				
			||||||
    }]])
 | 
					    }]])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
async def on_client_disconnected(ctx: Context, client: Client):
 | 
					async def on_client_disconnected(ctx: Context, client: Client):
 | 
				
			||||||
| 
						 | 
					@ -354,6 +354,7 @@ class CommandProcessor(metaclass=CommandMeta):
 | 
				
			||||||
    def __call__(self, raw: str):
 | 
					    def __call__(self, raw: str):
 | 
				
			||||||
        if not raw:
 | 
					        if not raw:
 | 
				
			||||||
            return
 | 
					            return
 | 
				
			||||||
 | 
					        try:
 | 
				
			||||||
            command = raw.split()
 | 
					            command = raw.split()
 | 
				
			||||||
            basecommand = command[0]
 | 
					            basecommand = command[0]
 | 
				
			||||||
            if basecommand[0] == self.marker:
 | 
					            if basecommand[0] == self.marker:
 | 
				
			||||||
| 
						 | 
					@ -364,6 +365,8 @@ class CommandProcessor(metaclass=CommandMeta):
 | 
				
			||||||
                    method(self, *command[1:])
 | 
					                    method(self, *command[1:])
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                self.default(raw)
 | 
					                self.default(raw)
 | 
				
			||||||
 | 
					        except Exception as e:
 | 
				
			||||||
 | 
					            self._error_parsing_command(e)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def get_help_text(self) -> str:
 | 
					    def get_help_text(self) -> str:
 | 
				
			||||||
        s = ""
 | 
					        s = ""
 | 
				
			||||||
| 
						 | 
					@ -395,6 +398,9 @@ class CommandProcessor(metaclass=CommandMeta):
 | 
				
			||||||
    def _error_unknown_command(self, raw: str):
 | 
					    def _error_unknown_command(self, raw: str):
 | 
				
			||||||
        self.output(f"Could not find command {raw}. Known commands: {', '.join(self.commands)}")
 | 
					        self.output(f"Could not find command {raw}. Known commands: {', '.join(self.commands)}")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def _error_parsing_command(self, exception: Exception):
 | 
				
			||||||
 | 
					        self.output(str(exception))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ClientMessageProcessor(CommandProcessor):
 | 
					class ClientMessageProcessor(CommandProcessor):
 | 
				
			||||||
    marker = "!"
 | 
					    marker = "!"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue