don't add users before the bridge starts
This commit is contained in:
parent
8f5caaf834
commit
2aa1a32d64
@ -152,9 +152,9 @@ func voiceUpdate(s *discordgo.Session, event *discordgo.VoiceStateUpdate) {
|
|||||||
log.Println("user joined watched discord channel")
|
log.Println("user joined watched discord channel")
|
||||||
if Bridge.Connected {
|
if Bridge.Connected {
|
||||||
Bridge.CurrentChannel.Send(fmt.Sprintf("%v has joined Discord channel\n", u.Username), false)
|
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.DiscordUserCount = Bridge.DiscordUserCount + 1
|
||||||
Bridge.DiscordUsers[u.Username] = true
|
|
||||||
}
|
}
|
||||||
if event.ChannelID == "" {
|
if event.ChannelID == "" {
|
||||||
//leave event, trigger recount of active users
|
//leave event, trigger recount of active users
|
||||||
|
2
main.go
2
main.go
@ -31,7 +31,7 @@ func main() {
|
|||||||
discordGID := flag.String("discord-gid", lookupEnvOrString("DISCORD_GID", ""), "DISCORD_GID, discord gid")
|
discordGID := flag.String("discord-gid", lookupEnvOrString("DISCORD_GID", ""), "DISCORD_GID, discord gid")
|
||||||
discordCID := flag.String("discord-cid", lookupEnvOrString("DISCORD_CID", ""), "DISCORD_CID, discord cid")
|
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")
|
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()
|
flag.Parse()
|
||||||
log.Printf("app.config %v\n", getConfig(flag.CommandLine))
|
log.Printf("app.config %v\n", getConfig(flag.CommandLine))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user