Browse Source

client: Fixed incorrect numeric being listened to for nick errors.

master
Gisle Aune 6 years ago
parent
commit
15a51e0151
  1. 2
      client.go
  2. 8
      client_test.go

2
client.go

@ -763,7 +763,7 @@ func (client *Client) handleEvent(event *Event) {
client.Sendf("WHO %s", event.Args[0])
}
case "packet.443":
case "packet.431", "packet.432", "packet.433", "packet.436":
{
client.mutex.RLock()
hasRegistered := client.nick != ""

8
client_test.go

@ -37,13 +37,13 @@ func TestClient(t *testing.T) {
{Kind: 'C', Data: "CAP REQ :multi-prefix userhost-in-names"},
{Kind: 'S', Data: ":testserver.example.com CAP * ACK :multi-prefix userhost-in-names"},
{Kind: 'C', Data: "CAP END"},
{Kind: 'S', Data: ":testserver.example.com 443 * Test :Nick is not available"},
{Kind: 'S', Data: ":testserver.example.com 433 * Test :Nick is not available"},
{Kind: 'C', Data: "NICK Test2"},
{Kind: 'S', Data: ":testserver.example.com 443 * Test2 :Nick is not available"},
{Kind: 'S', Data: ":testserver.example.com 433 * Test2 :Nick is not available"},
{Kind: 'C', Data: "NICK Test3"},
{Kind: 'S', Data: ":testserver.example.com 443 * Test3 :Nick is not available"},
{Kind: 'S', Data: ":testserver.example.com 433 * Test3 :Nick is not available"},
{Kind: 'C', Data: "NICK Test4"},
{Kind: 'S', Data: ":testserver.example.com 443 * Test4 :Nick is not available"},
{Kind: 'S', Data: ":testserver.example.com 433 * Test4 :Nick is not available"},
{Kind: 'C', Data: "NICK Test768"},
{Kind: 'S', Data: ":testserver.example.com 001 Test768 :Welcome to the TestServer Internet Relay Chat Network test"},
{Kind: 'C', Data: "WHO Test768*"},

Loading…
Cancel
Save