Fixed bot going to root when default channel not specified
This commit is contained in:
parent
5161770cb1
commit
63aa6ae6c9
4
main.go
4
main.go
|
@ -28,7 +28,7 @@ func (dj *mumbledj) OnConnect(e *gumble.ConnectEvent) {
|
||||||
if dj.client.Channels().Find(dj.defaultChannel) != nil {
|
if dj.client.Channels().Find(dj.defaultChannel) != nil {
|
||||||
dj.client.Self().Move(dj.client.Channels().Find(dj.defaultChannel))
|
dj.client.Self().Move(dj.client.Channels().Find(dj.defaultChannel))
|
||||||
} else {
|
} else {
|
||||||
fmt.Println("Channel doesn't exist, moving to root channel...")
|
fmt.Println("Channel doesn't exist, staying in root channel...")
|
||||||
}
|
}
|
||||||
|
|
||||||
err := loadConfiguration()
|
err := loadConfiguration()
|
||||||
|
@ -75,7 +75,7 @@ func main() {
|
||||||
flag.StringVar(&port, "port", "64738", "port for Mumble server")
|
flag.StringVar(&port, "port", "64738", "port for Mumble server")
|
||||||
flag.StringVar(&username, "username", "MumbleDJ", "username of MumbleDJ on server")
|
flag.StringVar(&username, "username", "MumbleDJ", "username of MumbleDJ on server")
|
||||||
flag.StringVar(&password, "password", "", "password for Mumble server (if needed)")
|
flag.StringVar(&password, "password", "", "password for Mumble server (if needed)")
|
||||||
flag.StringVar(&channel, "channel", "", "default channel for MumbleDJ")
|
flag.StringVar(&channel, "channel", "root", "default channel for MumbleDJ")
|
||||||
flag.StringVar(&debug, "debug", "false", "toggle debug messages")
|
flag.StringVar(&debug, "debug", "false", "toggle debug messages")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
|
|
Reference in a new issue