v1.1更新,详见changelogs
This commit is contained in:
@@ -9,7 +9,11 @@ pub struct Configuration {
|
||||
username_prefix: String,
|
||||
count: i32,
|
||||
proxy_url: String,
|
||||
reco_words: Vec<String>
|
||||
reco_words: Vec<String>,
|
||||
login_commands: Vec<String>,
|
||||
spam_file: String,
|
||||
spam_delay_ms: i32,
|
||||
random_prefix: bool,
|
||||
}
|
||||
|
||||
impl Configuration {
|
||||
@@ -48,6 +52,10 @@ impl Configuration {
|
||||
count: 300,
|
||||
proxy_url: "http://uu-proxy.com/api/get_proxies?id=RZ7GS5ZYTA&size=1&schemes=socks5&support_https=false&format=json".to_string(),
|
||||
reco_words: vec!["AntiAttack".to_string()],
|
||||
login_commands: vec![],
|
||||
spam_file: "".to_string(),
|
||||
spam_delay_ms: 0,
|
||||
random_prefix: false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,4 +75,36 @@ impl Configuration {
|
||||
pub fn proxy_url(&self) -> &str {
|
||||
self.proxy_url.as_str()
|
||||
}
|
||||
}
|
||||
pub fn reco_words(&self) -> &Vec<String> {
|
||||
&self.reco_words
|
||||
}
|
||||
pub fn login_commands(&self) -> &Vec<String> {
|
||||
&self.login_commands
|
||||
}
|
||||
pub fn spam_file(&self) -> &str {
|
||||
self.spam_file.as_str()
|
||||
}
|
||||
pub fn spam_delay_ms(&self) -> i32 {
|
||||
self.spam_delay_ms
|
||||
}
|
||||
pub fn random_prefix(&self) -> bool {
|
||||
self.random_prefix
|
||||
}
|
||||
}
|
||||
|
||||
// impl Clone for Configuration {
|
||||
// fn clone(&self) -> Self {
|
||||
// Configuration {
|
||||
// server_ip: self.server_ip.clone(),
|
||||
// server_port: self.server_port.clone(),
|
||||
// username_prefix: self.username_prefix.clone(),
|
||||
// count: self.count,
|
||||
// proxy_url: self.proxy_url.clone(),
|
||||
// reco_words: self.reco_words.clone(),
|
||||
// login_commands:self.login_commands.clone(),
|
||||
// random_prefix: self.random_prefix,
|
||||
// spam_file: self.spam_file.clone(),
|
||||
// spam_delay_ms: self.spam_delay_ms,
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
Reference in New Issue
Block a user