diff --git a/commands.go b/commands.go index c5f282f..b3b3bf7 100644 --- a/commands.go +++ b/commands.go @@ -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) { diff --git a/config.gcfg b/config.gcfg index db67c05..5c7a595 100644 --- a/config.gcfg +++ b/config.gcfg @@ -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 diff --git a/parseconfig.go b/parseconfig.go index 9da7ec2..4b4a16a 100644 --- a/parseconfig.go +++ b/parseconfig.go @@ -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 } }