Fixing build issues

This commit is contained in:
MichaelOultram 2015-07-28 15:09:20 +01:00
parent 4fe2713a93
commit 66fad37e34
3 changed files with 22 additions and 0 deletions

View file

@ -82,6 +82,13 @@ func parseCommand(user *gumble.User, username, command string) {
} else {
dj.SendPrivateMessage(user, NO_PERMISSION_MSG)
}
// Web command
case dj.conf.Aliases.WebAlias:
if dj.HasPermission(username, dj.conf.Permissions.AdminWeb) {
web(user)
} else {
dj.SendPrivateMessage(user, NO_PERMISSION_MSG)
}
// Move command
case dj.conf.Aliases.MoveAlias:
if dj.HasPermission(username, dj.conf.Permissions.AdminMove) {
@ -291,6 +298,11 @@ func volume(user *gumble.User, username, value string) {
}
}
// web performs !web functionality. Gives user URL to web interface
func web(user *gumble.User){
}
// move performs !move functionality. Determines if the supplied channel is valid and moves the bot
// to the channel if it is.
func move(user *gumble.User, channel string) {

View file

@ -86,6 +86,10 @@ HelpAlias = "help"
# DEFAULT VALUE: "volume"
VolumeAlias = "volume"
# Alias used for web address command
# DEFAULT VALUE: "web"
WebAlias = "web"
# Alias used for move command
# DEFAULT VALUE: "move"
MoveAlias = "move"
@ -162,6 +166,10 @@ AdminHelp = false
# DEFAULT VALUE: false
AdminVolume = false
# Make web an admin command?
# DEFAULT VALUE: false
AdminWeb = false
# Make move an admin command?
# DEFAULT VALUE: true
AdminMove = true

View file

@ -51,6 +51,7 @@ type DjConfig struct {
NumCachedAlias string
CacheSizeAlias string
KillAlias string
WebAlias string
}
Permissions struct {
AdminsEnabled bool
@ -70,6 +71,7 @@ type DjConfig struct {
AdminNumCached bool
AdminCacheSize bool
AdminKill bool
AdminWeb bool
}
}