X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=blobdiff_plain;f=tests%2Fbug-1640796.cmd;fp=tests%2Fbug-1640796.cmd;h=0d34e3664310bdde794784a92030d5a4f6120eb6;hp=0000000000000000000000000000000000000000;hb=0400a5a6479398d82526785c18c0df8bc8b92dce;hpb=d17e10da972ce5776c60b4c317267c6abe0e1ead diff --git a/tests/bug-1640796.cmd b/tests/bug-1640796.cmd new file mode 100644 index 0000000..0d34e36 --- /dev/null +++ b/tests/bug-1640796.cmd @@ -0,0 +1,35 @@ +define srv1 localhost:7601 +define srv1-name irc.example.net +define hidden-srv *.undernet.org +define channel #random-channel +define cl1-nick Ch4n0pm4n +define cl2-nick D00dm4n + +# Connect two clients. Join one to the test channel. +connect cl1 %cl1-nick% op3rm4n %srv1% :Some Chanop +connect cl2 %cl2-nick% d00dm4n %srv1% :Someone Else +:cl1 join %channel% +:cl1 mode %channel% +D +:cl1 expect %cl1-nick% mode %channel% \\+D + +# Now join the other client, and let the chanop remove -D. Both +# should see the channel become +d. +:cl2 wait cl1 +:cl2 join %channel% +:cl1 wait cl2 +:cl1 mode %channel% -D +:cl1 expect %cl1-nick% mode %channel% -D\\+d +:cl2 expect %cl1-nick% mode %channel% -D\\+d + +# Bug 1640796 is that if the chanop sends +D-D, the channel is +# improperly marked -d. (An empty mode change is also sent to other +# servers.) +:cl1 mode %channel% +D-D +:cl1 mode %channel% +:cl1 expect %srv1-name% 324 %channel% \\+.*d + +# Make sure that client 1 does see the -d when client 2 quits +:cl2 wait cl1 +:cl1 expect %hidden-srv% mode %channel% -d +:cl2 part %channel% +:cl1 quit done