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 { } else {
dj.SendPrivateMessage(user, NO_PERMISSION_MSG) 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 // Move command
case dj.conf.Aliases.MoveAlias: case dj.conf.Aliases.MoveAlias:
if dj.HasPermission(username, dj.conf.Permissions.AdminMove) { 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 // move performs !move functionality. Determines if the supplied channel is valid and moves the bot
// to the channel if it is. // to the channel if it is.
func move(user *gumble.User, channel string) { func move(user *gumble.User, channel string) {

View file

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

View file

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