Skip to content

Commit

Permalink
Merge pull request #34 from Jqnxyz/master
Browse files Browse the repository at this point in the history
Fixes #32 and fixes #33
  • Loading branch information
udoprog authored May 4, 2019
2 parents 3474a1f + 6c01784 commit b09eda2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed
- `!song request` no longer allows one extra request to enter the queue. ([#33])

### Added
- `!admin version` to check current setmod-bot package version. ([#32])

[Unreleased]: https://github.com/udoprog/setmod/compare/0.2.6...HEAD
[#33]: https://github.com/udoprog/setmod/issues/33
[#32]: https://github.com/udoprog/setmod/issues/32

## [0.2.6]

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ Secret things which are stored in the database, like tokens.

All admin commands are restricted to **moderators**.

* `!admin version` - Responds with the current version of the setmod-bot package.
* `!admin refresh-mods` - Refresh the set of moderators in the bot. This is required if someone is modded or unmodded while the bot is running.
* `!admin shutdown` - Cause the mod to cleanly shut down, and hopefully being restarted by the management process.

Expand Down
3 changes: 3 additions & 0 deletions bot/src/irc/admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ impl command::Handler for Admin {
// The response from the /mods command will be received by the Handler.
ctx.privmsg("/mods");
}
Some("version") => {
ctx.respond(format!("Bot Version {}", env!("CARGO_PKG_VERSION")));
}
Some("shutdown") => {
if ctx.shutdown.shutdown() {
ctx.respond("Shutting down...");
Expand Down
2 changes: 1 addition & 1 deletion bot/src/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ impl PlayerClient {
}

// NB: moderator is allowed to violate max queue length.
if !is_moderator && len > max_queue_length as usize {
if !is_moderator && len >= max_queue_length as usize {
return Err(AddTrackError::QueueFull);
}

Expand Down

0 comments on commit b09eda2

Please sign in to comment.