fix test
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
blackbeard420 2021-10-27 21:53:28 -04:00
parent 52f42e7734
commit 81505513ad

View File

@ -84,11 +84,13 @@ func TestGetServerInfo(t *testing.T) {
con.NumericCallback = func(from string, i int, args string) {
if i == RPL_ENDOFMOTD {
res := GetServerInfo("irc.libera.chat:6667", "irc-go4240")
con.SendPrivmsg(channel, fmt.Sprintf("Libera has %d users, %d channels, %d servers, %d invisible", res.Users, res.Channels, res.Servers, res.Invisible))
res = GetServerInfo("irc.choopa.net:6667", "irc-go4240")
con.SendPrivmsg(channel, fmt.Sprintf("EFNet has %d users, %d channels, %d servers, %d invisible", res.Users, res.Channels, res.Servers, res.Invisible))
con.SendQuit("Scan Completed")
go func() {
res := GetServerInfo("irc.libera.chat:6667", "irc-go4240")
con.SendPrivmsg(channel, fmt.Sprintf("Libera has %d users, %d channels, %d servers, %d invisible", res.Users, res.Channels, res.Servers, res.Invisible))
res = GetServerInfo("irc.choopa.net:6667", "irc-go4240")
con.SendPrivmsg(channel, fmt.Sprintf("EFNet has %d users, %d channels, %d servers, %d invisible", res.Users, res.Channels, res.Servers, res.Invisible))
con.SendQuit("Scan Completed")
}()
}
}