ircu2.10.12 pk910 fork
[ircu2.10.12-pk.git] / tests / bug-1674539.cmd
1 define srv1 127.0.0.1:7611
2 define srv1-name irc-2.example.net
3 define srv2 127.0.0.2:7621
4 define srv2-name irc-3.example.net
5 define cl1-nick oper1
6 define cl2-nick oper2
7 define cl3-nick oper3
8
9 # Connect two clients to server 1, one to server 2, and oper them all up.
10 connect cl1 %cl1-nick% oper %srv1% :Oper 1
11 connect cl2 %cl2-nick% oper %srv1% :Oper 2
12 connect cl3 %cl3-nick% oper %srv2% :Oper 3
13 :cl1 oper oper oper
14 :cl2 oper oper oper
15 :cl3 oper oper oper
16
17 # Check that we get local privileges properly.
18 :cl1 wait cl2,cl3
19 :cl1 raw :privs %cl1-nick%
20 :cl1 expect %srv1-name% 270 %cl1-nick% %cl1-nick% :CHAN_LIMIT
21 :cl1 raw :privs %cl2-nick%
22 :cl1 expect %srv1-name% 270 %cl1-nick% %cl2-nick% :CHAN_LIMIT
23
24 # Bug 1674539 is that remote /privs do not get any response.
25 # Testing shows that the problem only shows up with a hub between.
26 :cl1 raw :privs %cl3-nick%
27 :cl1 expect %srv2-name% 270 %cl1-nick% %cl3-nick% :CHAN_LIMIT
28
29 # Synchronize everything
30 sync cl1,cl2,cl3
31 :cl1 quit done
32 :cl2 quit done
33 :cl3 quit done