README.md rules that nicks are case-sensitive, but the IRC listener's relay and user MODE on both transports compared nicks ignoring case: an IRC listener user alice never saw a PRIVMSG, NOTICE, JOIN, PART, NICK or QUIT from Alice, and MODE Alice from alice was taken as her own nick. These checks now use ==. Tests cover alice receiving each of these from Alice, MODE Alice from alice getting 502 on both transports, and Alice registering while alice exists. README.md drops the text that described the old behaviour. Model: opus-5-5
This commit was merged in pull request #141.
This commit is contained in:
@@ -1084,9 +1084,9 @@ func TestIntegrationWallops(t *testing.T) {
|
||||
}
|
||||
|
||||
// TestIntegrationUserMode covers MODE for a nick: changes
|
||||
// and queries of your own modes in any letter case, refusal
|
||||
// for another nick, and a rejected mode string changing
|
||||
// nothing.
|
||||
// and queries of your own modes, refusal for another nick,
|
||||
// even one that differs from yours only in letter case, and
|
||||
// a rejected mode string changing nothing.
|
||||
func TestIntegrationUserMode(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
@@ -1106,7 +1106,9 @@ func TestIntegrationUserMode(t *testing.T) {
|
||||
for _, step := range []struct {
|
||||
line, want string
|
||||
}{
|
||||
{"MODE ALICE +w", " 221 alice +w"},
|
||||
{"MODE alice +w", " 221 alice +w"},
|
||||
{"MODE Alice", notYours},
|
||||
{"MODE Alice -w", notYours},
|
||||
{"MODE bob", notYours},
|
||||
{"MODE bob -w", notYours},
|
||||
{"MODE alice xw", unknown},
|
||||
|
||||
Reference in New Issue
Block a user