pull/90/head
Gabriel Plassard 2015-10-09 21:49:56 +02:00
parent c5409a8d8b
commit 5deb85d8fb
4 changed files with 13 additions and 13 deletions

View File

@ -162,14 +162,14 @@ func parseCommand(user *gumble.User, username, command string) {
}
// Shuffleon command
case dj.conf.Aliases.ShuffleOnAlias:
case dj.conf.Aliases.ShuffleOnAlias:
if dj.HasPermission(username, dj.conf.Permissions.AdminShuffleToggle) {
toggleAutomaticShuffle(true, user, username)
} else {
dj.SendPrivateMessage(user, NO_PERMISSION_MSG)
}
// Shuffleoff command
// Shuffleoff command
case dj.conf.Aliases.ShuffleOffAlias:
if dj.HasPermission(username, dj.conf.Permissions.AdminShuffleToggle) {
toggleAutomaticShuffle(false, user, username)

View File

@ -52,7 +52,7 @@ type DjConfig struct {
NumCachedAlias string
CacheSizeAlias string
KillAlias string
ShuffleAlias string
ShuffleAlias string
ShuffleOnAlias string
ShuffleOffAlias string
}
@ -74,8 +74,8 @@ type DjConfig struct {
AdminNumCached bool
AdminCacheSize bool
AdminKill bool
AdminShuffle bool
AdminShuffleToggle bool
AdminShuffle bool
AdminShuffleToggle bool
}
}

View File

@ -65,7 +65,7 @@ func (q *SongQueue) NextSong() {
func (q *SongQueue) PeekNext() (Song, error) {
if q.Len() > 1 {
if dj.conf.General.AutomaticShuffleOn{ //Shuffle mode is active
q.RandomNextSong(false)
q.RandomNextSong(false)
}
return q.queue[1], nil
}
@ -122,7 +122,7 @@ func (q *SongQueue) ShuffleSongs() {
}
// Sets a random song as next song to be played
// queueWasEmpty wether the queue was empty before adding the last Song
// queueWasEmpty wether the queue was empty before adding the last song
func (q *SongQueue) RandomNextSong(queueWasEmpty bool){
nextSongIndex := 1
if queueWasEmpty{

View File

@ -71,11 +71,11 @@ const CACHE_SIZE_MSG = "The cache is currently %g MB in size."
// Message shown to user when they attempt to issue a cache-related command when caching is not enabled.
const CACHE_NOT_ENABLED_MSG = "The cache is not currently enabled."
// Message shown to user when they attempt to shuffle the a playlist with less than 2 elements.
const CANT_SHUFFLE_MSG = "Can't shuffle the playlist if there is less than 2 songs."
// Message shown to user when they attempt to shuffle the queue and it has less than 2 elements.
const CANT_SHUFFLE_MSG = "Can't shuffle the queue if there is less than 2 songs."
// Message shown to users when the playlist has been successfully shuffled.
const SHUFFLE_SUCCESS_MSG = "The current playlist has been successfully shuffled by <b>%s</b> (starting from next song)."
// Message shown to users when the songqueue has been successfully shuffled.
const SHUFFLE_SUCCESS_MSG = "The current songqueue has been successfully shuffled by <b>%s</b> (starting from next song)."
// Message shown to users when automatic shuffle is activated
const SHUFFLE_ON_MESSAGE = "<b>%s</b> has turned automatic shuffle on."
@ -125,9 +125,9 @@ const HELP_HTML = `<br/>
<p><b>!reset</b> - An admin command that resets the song queue. </p>
<p><b>!forceskip</b> - An admin command that forces a song skip. </p>
<p><b>!forceskipplaylist</b> - An admin command that forces a playlist skip. </p>
<p><b>!shuffle</b> - An admin command that shuffles the current playlist. </p>
<p><b>!shuffle</b> - An admin command that shuffles the current queue. </p>
<p><b>!shuffleon</b> - An admin command that enables auto shuffling.</p>
<p><b>!shuffleoff</b> - An admin command that disables auto shuffling.</p>
<p><b>!shuffleoff</b> - An admin command that disables auto shuffling.</p>
<p><b>!move </b>- Moves MumbleDJ into channel if it exists.</p>
<p><b>!reload</b> - Reloads mumbledj.gcfg configuration settings.</p>
<p><b>!setcomment</b> - Sets the comment for the bot.</p>