Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Bump version 4.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
tropicbliss committed Oct 28, 2021
1 parent d34becd commit 3be95e0
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 15 deletions.
42 changes: 37 additions & 5 deletions CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@ Offset refers to the the time between the snipe request leaving your computer/se

### Options

| Option | Default | Description |
| ------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `mode` | mandatory field | Sniping mode. Choose between `mj` (Mojang authentication), `ms` (Microsoft authentication), or `prename` (GC sniping). |
| `offset` | mandatory field | Snipe offset |
| `name_queue ` | `[]` | Enables name queueing. |
| Option | Default | Description |
| -------- | --------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `mode` | mandatory field | Sniping mode. Choose between `mj` (Mojang authentication), `ms` (Microsoft authentication), or `prename` (GC sniping). |
| `offset` | mandatory field | Snipe offset |

### Examples

Expand Down Expand Up @@ -146,6 +145,39 @@ password = "youaremylittlepogchamp"
bearer = "minecraft access token"
```

## Name Queue

An optional module that alows you to specify a name queue, in which the sniper will snipe names specified on the queue sequentially.

### Options

| Option | Default | Description |
| -------------------- | --------------- | ------------------------------------------------------------------------------------------------------ |
| `queue` | `[]` | Specifies name queue. |
| `never_stop_sniping` | mandatory field | When enabled, the sniper will continue to snipe names from the queue even after a snipe is successful. |

### Examples

#### If the sniper successfully snipes "Dream", the sniper will stop sniping

```toml
# config.toml

[name_queue]
queue = ["Dream", "Marc"]
never_stop_sniping = false
```

#### If the sniper successfully snipes "Dream" and there are more accounts available to snipe with, attempt to snipe "Marc"

```toml
# config.toml

[name_queue]
queue = ["Dream", "Marc"]
never_stop_sniping = true
```

## Skin

An optional module that when specified will enable skin change after successful snipes.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "buckshot"
version = "4.0.3"
version = "4.0.4"
authors = ["tropicbliss <[email protected]>"]
edition = "2021"
license = "MIT"
Expand Down
12 changes: 9 additions & 3 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ struct PrivateConfig {
#[serde(deserialize_with = "to_task")]
mode: SnipeTask,
skin: Option<Skin>,
name_queue: Option<Vec<String>>,
name_queue: Option<NameQueue>,
}

#[derive(Deserialize)]
pub struct NameQueue {
pub queue: Vec<String>,
pub never_stop_sniping: bool,
}

#[derive(Deserialize)]
Expand All @@ -20,7 +26,7 @@ pub struct Config {
pub offset: u32,
pub mode: SnipeTask,
pub skin: Option<Skin>,
pub name_queue: Option<Vec<String>>,
pub name_queue: Option<NameQueue>,
}

#[derive(PartialEq)]
Expand Down Expand Up @@ -130,7 +136,7 @@ pub fn new() -> Result<Config> {
bail!("No accounts provided in config file");
}
if let Some(count) = &cfg.name_queue {
if count.is_empty() {
if count.queue.is_empty() {
bail!("No name provided in name queue");
}
}
Expand Down
10 changes: 8 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ async fn main() -> Result<()> {
}
let name_list = if let Some(name) = args.name {
vec![name]
} else if let Some(x) = config.name_queue.clone() {
x
} else if let Some(x) = &config.name_queue {
x.queue.clone()
} else {
let name = cli::get_name_choice().with_context(|| "Failed to get name choice")?;
vec![name]
Expand Down Expand Up @@ -191,6 +191,12 @@ async fn main() -> Result<()> {
})?;
writeln!(stdout(), "{}", style("Successfully changed skin").green())?;
}
if let Some(name_queue) = &config.name_queue {
if name_queue.never_stop_sniping && !config.account_entry.is_empty() {
config.account_entry.remove(account_idx);
continue;
}
}
break;
}
writeln!(stdout(), "Failed to snipe {}", name)?;
Expand Down
5 changes: 2 additions & 3 deletions src/sockets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,11 @@ pub async fn snipe_executor(
let status: u16 = res[9..]
.parse()
.expect("Failed to parse HTTP status code from string");
let res_data = ResData {
ResData {
status,
timestamp,
account_idx,
};
res_data
}
});
handles.push(handle);
}
Expand Down

0 comments on commit 3be95e0

Please sign in to comment.