diff --git a/handlers.go b/handlers.go index 6118458..b7bcca0 100644 --- a/handlers.go +++ b/handlers.go @@ -152,9 +152,9 @@ func voiceUpdate(s *discordgo.Session, event *discordgo.VoiceStateUpdate) { log.Println("user joined watched discord channel") if Bridge.Connected { Bridge.CurrentChannel.Send(fmt.Sprintf("%v has joined Discord channel\n", u.Username), false) + Bridge.DiscordUsers[u.Username] = true } Bridge.DiscordUserCount = Bridge.DiscordUserCount + 1 - Bridge.DiscordUsers[u.Username] = true } if event.ChannelID == "" { //leave event, trigger recount of active users diff --git a/main.go b/main.go index 9c96be2..bd20318 100644 --- a/main.go +++ b/main.go @@ -31,7 +31,7 @@ func main() { discordGID := flag.String("discord-gid", lookupEnvOrString("DISCORD_GID", ""), "DISCORD_GID, discord gid") discordCID := flag.String("discord-cid", lookupEnvOrString("DISCORD_CID", ""), "DISCORD_CID, discord cid") discordCommand := flag.String("discord-command", lookupEnvOrString("DISCORD_COMMAND", "mumble-discord"), "Discord command string, env alt DISCORD_COMMAND, optional, defaults to mumble-discord") - autoMode := flag.Bool("auto", lookupEnvOrBool("AUTO_MODE", false), "bridge starts in auto mode") + autoMode := flag.Bool("auto-mode", lookupEnvOrBool("AUTO_MODE", false), "bridge starts in auto mode") flag.Parse() log.Printf("app.config %v\n", getConfig(flag.CommandLine))