Trying to work out why dummy won't connect
This commit is contained in:
parent
d9527a4093
commit
c6c58c4d11
2
main.go
2
main.go
|
@ -249,7 +249,7 @@ func main() {
|
||||||
|
|
||||||
if testcode {
|
if testcode {
|
||||||
Verbose("Testing is enabled")
|
Verbose("Testing is enabled")
|
||||||
Test(password, address, port)
|
Test(password, address, port, accesstokens)
|
||||||
}
|
}
|
||||||
|
|
||||||
web = NewWebServer(9563)
|
web = NewWebServer(9563)
|
||||||
|
|
8
test.go
8
test.go
|
@ -10,15 +10,17 @@ type TestSettings struct {
|
||||||
password string
|
password string
|
||||||
ip string
|
ip string
|
||||||
port string
|
port string
|
||||||
|
accesstokens []string
|
||||||
}
|
}
|
||||||
|
|
||||||
var test TestSettings
|
var test TestSettings
|
||||||
|
|
||||||
func Test(password, ip, port string) {
|
func Test(password, ip, port, accesstokens string) {
|
||||||
test = TestSettings{
|
test = TestSettings{
|
||||||
password: password,
|
password: password,
|
||||||
ip: ip,
|
ip: ip,
|
||||||
port: port,
|
port: port,
|
||||||
|
accesstokens: strings.Split(accesstokens, " "),
|
||||||
}
|
}
|
||||||
test.testYoutubeSong()
|
test.testYoutubeSong()
|
||||||
}
|
}
|
||||||
|
@ -27,7 +29,9 @@ func (t TestSettings) createClient(uname string) *gumble.Client {
|
||||||
return gumble.NewClient(&gumble.Config{
|
return gumble.NewClient(&gumble.Config{
|
||||||
Username: uname,
|
Username: uname,
|
||||||
Password: t.password,
|
Password: t.password,
|
||||||
Address: t.ip + ":" + t.port})
|
Address: t.ip + ":" + t.port,
|
||||||
|
Tokens: t.accesstokens,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t TestSettings) testYoutubeSong() {
|
func (t TestSettings) testYoutubeSong() {
|
||||||
|
|
Reference in a new issue