punishments
This commit is contained in:
		@@ -1341,6 +1341,28 @@ impl VeilidAPI {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    async fn debug_punish_list(&self, _args: Vec<String>) -> VeilidAPIResult<String> {
 | 
				
			||||||
 | 
					        //
 | 
				
			||||||
 | 
					        let network_manager = self.network_manager()?;
 | 
				
			||||||
 | 
					        let address_filter = network_manager.address_filter();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        let out = format!("Address Filter Punishments:\n{:#?}", address_filter);
 | 
				
			||||||
 | 
					        return Ok(out);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    async fn debug_punish(&self, args: String) -> VeilidAPIResult<String> {
 | 
				
			||||||
 | 
					        let args: Vec<String> =
 | 
				
			||||||
 | 
					            shell_words::split(&args).map_err(|e| VeilidAPIError::parse_error(e, args))?;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        let command = get_debug_argument_at(&args, 0, "debug_punish", "command", get_string)?;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if command == "list" {
 | 
				
			||||||
 | 
					            self.debug_punish_list(args).await
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            Ok(">>> Unknown command\n".to_owned())
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pub async fn debug_help(&self, _args: String) -> VeilidAPIResult<String> {
 | 
					    pub async fn debug_help(&self, _args: String) -> VeilidAPIResult<String> {
 | 
				
			||||||
        Ok(r#"buckets [dead|reliable]
 | 
					        Ok(r#"buckets [dead|reliable]
 | 
				
			||||||
dialinfo
 | 
					dialinfo
 | 
				
			||||||
@@ -1358,6 +1380,7 @@ restart network
 | 
				
			|||||||
contact <node>[<modifiers>]
 | 
					contact <node>[<modifiers>]
 | 
				
			||||||
ping <destination>
 | 
					ping <destination>
 | 
				
			||||||
relay <relay> [public|local]
 | 
					relay <relay> [public|local]
 | 
				
			||||||
 | 
					punish list
 | 
				
			||||||
route allocate [ord|*ord] [rel] [<count>] [in|out]
 | 
					route allocate [ord|*ord] [rel] [<count>] [in|out]
 | 
				
			||||||
      release <route>
 | 
					      release <route>
 | 
				
			||||||
      publish <route> [full]
 | 
					      publish <route> [full]
 | 
				
			||||||
@@ -1450,6 +1473,8 @@ record list <local|remote>
 | 
				
			|||||||
                self.debug_route(rest).await
 | 
					                self.debug_route(rest).await
 | 
				
			||||||
            } else if arg == "record" {
 | 
					            } else if arg == "record" {
 | 
				
			||||||
                self.debug_record(rest).await
 | 
					                self.debug_record(rest).await
 | 
				
			||||||
 | 
					            } else if arg == "punish" {
 | 
				
			||||||
 | 
					                self.debug_punish(rest).await
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
                Err(VeilidAPIError::generic("Unknown server debug command"))
 | 
					                Err(VeilidAPIError::generic("Unknown server debug command"))
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,6 +6,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
environment:
 | 
					environment:
 | 
				
			||||||
  sdk: '>=3.0.0 <4.0.0'
 | 
					  sdk: '>=3.0.0 <4.0.0'
 | 
				
			||||||
 | 
					  flutter: '>=3.10.6'
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
dependencies:
 | 
					dependencies:
 | 
				
			||||||
  change_case: ^1.0.1
 | 
					  change_case: ^1.0.1
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user