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 {
|
||||
Verbose("Testing is enabled")
|
||||
Test(password, address, port)
|
||||
Test(password, address, port, accesstokens)
|
||||
}
|
||||
|
||||
web = NewWebServer(9563)
|
||||
|
|
8
test.go
8
test.go
|
@ -10,15 +10,17 @@ type TestSettings struct {
|
|||
password string
|
||||
ip string
|
||||
port string
|
||||
accesstokens []string
|
||||
}
|
||||
|
||||
var test TestSettings
|
||||
|
||||
func Test(password, ip, port string) {
|
||||
func Test(password, ip, port, accesstokens string) {
|
||||
test = TestSettings{
|
||||
password: password,
|
||||
ip: ip,
|
||||
port: port,
|
||||
accesstokens: strings.Split(accesstokens, " "),
|
||||
}
|
||||
test.testYoutubeSong()
|
||||
}
|
||||
|
@ -27,7 +29,9 @@ func (t TestSettings) createClient(uname string) *gumble.Client {
|
|||
return gumble.NewClient(&gumble.Config{
|
||||
Username: uname,
|
||||
Password: t.password,
|
||||
Address: t.ip + ":" + t.port})
|
||||
Address: t.ip + ":" + t.port,
|
||||
Tokens: t.accesstokens,
|
||||
})
|
||||
}
|
||||
|
||||
func (t TestSettings) testYoutubeSong() {
|
||||
|
|
Reference in a new issue