From 5e4ae7c99965801cd91d974637ad344a47b5414f Mon Sep 17 00:00:00 2001 From: Val Lorentz Date: Sun, 19 Sep 2021 15:33:31 +0200 Subject: [PATCH] Add tests for WALLOPS (#109) * Add tests for WALLOPS * Add perms on plexus/hybrid, skip on ergo, laxer matching for ircu2 * Fix again for irc2 and ircu2 * Servers MAY send WALLOPS only to operators. --- Makefile | 2 + irctest/controllers/hybrid.py | 2 +- irctest/controllers/inspircd.py | 1 + irctest/controllers/plexus4.py | 2 +- irctest/server_tests/wallops.py | 74 +++++++++++++++++++++++++++++++++ 5 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 irctest/server_tests/wallops.py diff --git a/Makefile b/Makefile index 7f8f409..37d3726 100644 --- a/Makefile +++ b/Makefile @@ -90,12 +90,14 @@ SNIRCD_SELECTORS := \ # testListEmpty and testListOne fails because irc2 deprecated LIST # testKickDefaultComment fails because it uses the nick of the kickee rather than the kicker. +# testWallopsPrivileges fails because it ignores the command instead of replying ERR_UNKNOWNCOMMAND IRC2_SELECTORS := \ not Ergo \ and not deprecated \ and not strict \ and not testListEmpty and not testListOne \ and not testKickDefaultComment \ + and not testWallopsPrivileges \ $(EXTRA_SELECTORS) MAMMON_SELECTORS := \ diff --git a/irctest/controllers/hybrid.py b/irctest/controllers/hybrid.py index 919ce8b..6725e7d 100644 --- a/irctest/controllers/hybrid.py +++ b/irctest/controllers/hybrid.py @@ -63,7 +63,7 @@ operator {{ encrypted = no; umodes = locops, servnotice, wallop; flags = admin, connect, connect:remote, die, globops, kill, kill:remote, - kline, module, rehash, restart, set, unkline, unxline, xline; + kline, module, rehash, restart, set, unkline, unxline, wallops, xline; }}; """ diff --git a/irctest/controllers/inspircd.py b/irctest/controllers/inspircd.py index e7d1120..9aba976 100644 --- a/irctest/controllers/inspircd.py +++ b/irctest/controllers/inspircd.py @@ -21,6 +21,7 @@ TEMPLATE_CONFIG = """