@@ -20,11 +20,24 @@ var clientFilters = map[string]clientFilter{
20
20
"CAP" : handleCap ,
21
21
}
22
22
23
+ // From rfc2812 section 5.1 (Command responses)
24
+ //
25
+ // 001 RPL_WELCOME
26
+ // "Welcome to the Internet Relay Network
27
+ // <nick>!<user>@<host>"
23
28
func handle001 (c * Client , m * Message ) {
24
29
c .currentNick = m .Params [0 ]
25
30
c .connected = true
26
31
}
27
32
33
+ // From rfc2812 section 5.2 (Error Replies)
34
+ //
35
+ // 433 ERR_NICKNAMEINUSE
36
+ // "<nick> :Nickname is already in use"
37
+ //
38
+ // - Returned when a NICK message is processed that results
39
+ // in an attempt to change to a currently existing
40
+ // nickname.
28
41
func handle433 (c * Client , m * Message ) {
29
42
// We only want to try and handle nick collisions during the initial
30
43
// handshake.
@@ -35,6 +48,17 @@ func handle433(c *Client, m *Message) {
35
48
c .Writef ("NICK :%s" , c .currentNick )
36
49
}
37
50
51
+ // From rfc2812 section 5.2 (Error Replies)
52
+ //
53
+ // 437 ERR_UNAVAILRESOURCE
54
+ // "<nick/channel> :Nick/channel is temporarily unavailable"
55
+ //
56
+ // - Returned by a server to a user trying to join a channel
57
+ // currently blocked by the channel delay mechanism.
58
+ //
59
+ // - Returned by a server to a user trying to change nickname
60
+ // when the desired nickname is blocked by the nick delay
61
+ // mechanism.
38
62
func handle437 (c * Client , m * Message ) {
39
63
// We only want to try and handle nick collisions during the initial
40
64
// handshake.
0 commit comments