1
0
mirror of https://github.com/stryan/mumble-discord-bridge.git synced 2024-11-22 21:35:44 -05:00

don't add users before the bridge starts

This commit is contained in:
stryan 2021-01-04 21:54:29 -05:00
parent 8f5caaf834
commit 2aa1a32d64
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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))