Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for PRIVMSG to a server mask #119

Closed
wants to merge 1 commit into from
Closed

Conversation

progval
Copy link
Owner

@progval progval commented Nov 6, 2021

ircdocs/modern-irc#134

A bunch of tests are failing, we need to work this out in the Modern PR

Note: it needs the following patch to plexus4 to be relevant:

diff --git a/modules/core/m_message.c b/modules/core/m_message.c
index adf0821..7568f20 100644
--- a/modules/core/m_message.c
+++ b/modules/core/m_message.c
@@ -575,7 +575,7 @@ handle_special(int p_or_n, const char *command, struct Client *client_p,
       return;
     }

-    if (MyClient(source_p) && !HasUMode(source_p, UMODE_NETADMIN) && !HasFlag(source_p, FLAGS_SERVICE) && strcmp(nick + 1, me.name))
+    if (false)
     {
       sendto_one(source_p, form_str(ERR_NOPRIVILEGES), me.name, source_p->name);
       return;

(I'm too lazy to figure out how to become a netadmin)

ircdocs/modern-irc#134

A bunch of tests are failing, we need to work this out in the Modern PR

Note: it needs the following patch to plexus4 to be relevant:

```diff
diff --git a/modules/core/m_message.c b/modules/core/m_message.c
index adf0821..7568f20 100644
--- a/modules/core/m_message.c
+++ b/modules/core/m_message.c
@@ -575,7 +575,7 @@ handle_special(int p_or_n, const char *command, struct Client *client_p,
       return;
     }

-    if (MyClient(source_p) && !HasUMode(source_p, UMODE_NETADMIN) && !HasFlag(source_p, FLAGS_SERVICE) && strcmp(nick + 1, me.name))
+    if (false)
     {
       sendto_one(source_p, form_str(ERR_NOPRIVILEGES), me.name, source_p->name);
       return;
```

(I'm too lazy to figure out how to become a netadmin)
@progval progval added the blocked by: Modern waiting for a PR/issue in the modern-irc spec label Nov 6, 2021
@github-actions
Copy link

github-actions bot commented Nov 6, 2021

  • artifacts/pytest results bahamut (stable)/pytest.xml: ✔️ 133 successful (7 skipped)
  • artifacts/pytest results bahamut-anope (stable)/pytest.xml: ✔️ 4 successful (3 skipped)
  • artifacts/pytest results bahamut-atheme (stable)/pytest.xml: ✔️ 4 successful (3 skipped)
  • artifacts/pytest results charybdis (stable)/pytest.xml: ✔️ 222 successful (62 skipped)
  • artifacts/pytest results ergo (stable)/pytest.xml: ✔️ 263 successful (11 skipped)
  • artifacts/pytest results hybrid (stable)/pytest.xml:
    • irctest::server_tests:
      • bot_mode: ✔️ 5 successful (3 skipped)
      • cap: ✔️ 5 successful (1 skipped)
      • channel: ✔️ 6 successful (4 skipped)
      • echo_message: ✔️ 5 successful (5 skipped)
      • isupport: ✔️ 1 successful (1 skipped)
      • kick: ✔️ 7 successful (2 skipped)
      • labeled_responses: ✔️ 13 successful (13 skipped)
      • message_tags: ✔️ 2 successful (2 skipped)
      • messages:
        • PrivmsgServermaskTestCase:
          • testPrivmsgServermask: ❌ 1 failed:
            • irctest.exceptions.NoMessageException
          • testPrivmsgServermaskNoMatch: ❌ 1 failed:
            • AssertionError: [Message(tags={}, prefix='My.Little.Server', command='NOTICE', params=['sender', 'The command PRIVMSG $*.foobar is no longer supported, please use $$*.foobar'])] assert 1 == 0
          • testPrivmsgServermaskStar: ❌ 1 failed:
            • irctest.exceptions.NoMessageException
          • testPrivmsgServermaskNotOper: ✔️ 1 successful
        • TagsTestCase: ✔️ 1 successful (1 skipped)
        • (others): ✔️ 4 successful
      • multiline: ✔️ 2 successful (2 skipped)
      • register_verify: ✔️ 4 successful (4 skipped)
      • regressions: ✔️ 7 successful (1 skipped)
      • statusmsg: ✔️ 2 successful (1 skipped)
      • chmodes: ✔️ 10 successful (3 skipped)
      • (others): ✔️ 73 successful
    • irctest::self_tests: ✔️ 49 successful
  • artifacts/pytest results inspircd (stable)/pytest.xml:
    • irctest::server_tests:
      • isupport: ✔️ 1 successful (1 skipped)
      • kick: ✔️ 7 successful (2 skipped)
      • messages:
        • PrivmsgServermaskTestCase:
          • testPrivmsgServermask: ❌ 1 failed:
            • AssertionError: expected params to match ['$*.server', 'hello there'], got ['$*', 'hello there']: Message(tags={}, prefix='[email protected]', command='PRIVMSG', params=['$*', 'hello there'])
          • (others): ✔️ 3 successful
        • (others): ✔️ 4 successful
      • multiline: ✔️ 2 successful (2 skipped)
      • register_verify: ✔️ 4 successful (4 skipped)
      • chmodes: ✔️ 10 successful (1 skipped)
      • (others): ✔️ 106 successful
    • irctest::self_tests: ✔️ 49 successful
  • artifacts/pytest results inspircd-anope (stable)/pytest.xml: ✔️ 33 successful (21 skipped)
  • artifacts/pytest results inspircd-atheme (stable)/pytest.xml: ✔️ 35 successful (23 skipped)
  • artifacts/pytest results irc2 (stable)/pytest.xml: ✔️ 135 successful (12 skipped)
  • artifacts/pytest results ircu2 (stable)/pytest.xml: ✔️ 123 successful (10 skipped)
  • artifacts/pytest results ngircd (stable)/pytest.xml:
    • irctest::server_tests:
      • cap: ✔️ 5 successful (1 skipped)
      • echo_message: ✔️ 5 successful (5 skipped)
      • bot_mode: ✔️ 5 successful (5 skipped)
      • kick: ✔️ 7 successful (2 skipped)
      • labeled_responses: ✔️ 13 successful (13 skipped)
      • isupport: ✔️ 1 successful (1 skipped)
      • away_notify: ✔️ 2 successful (2 skipped)
      • message_tags: ✔️ 2 successful (2 skipped)
      • messages:
        • PrivmsgServermaskTestCase:
          • testPrivmsgServermask: ❌ 1 failed:
            • AssertionError: expected params to match ['$*.server', 'hello there'], got ['user', 'hello there']: Message(tags={}, prefix='sender!~username@localhost', command='PRIVMSG', params=['user', 'hello there'])
          • testPrivmsgServermaskStar: ❌ 1 failed:
            • irctest.exceptions.NoMessageException
          • (others): ✔️ 2 successful
        • TagsTestCase: ✔️ 1 successful (1 skipped)
        • (others): ✔️ 4 successful
      • monitor: ✔️ 10 successful (10 skipped)
      • multiline: ✔️ 2 successful (2 skipped)
      • register_verify: ✔️ 4 successful (4 skipped)
      • regressions: ✔️ 6 successful (1 skipped)
      • statusmsg: ✔️ 2 successful (2 skipped)
      • chmodes: ✔️ 8 successful (3 skipped)
      • (others): ✔️ 58 successful
    • irctest::self_tests: ✔️ 49 successful
  • artifacts/pytest results ngircd-anope (stable)/pytest.xml: ✔️ 16 successful (15 skipped)
  • artifacts/pytest results ngircd-atheme (stable)/pytest.xml: ✔️ 16 successful (15 skipped)
  • artifacts/pytest results plexus4 (stable)/pytest.xml:
    • irctest::server_tests:
      • bot_mode: ✔️ 5 successful (5 skipped)
      • cap: ✔️ 5 successful (1 skipped)
      • channel: ✔️ 6 successful (2 skipped)
      • echo_message: ✔️ 5 successful (5 skipped)
      • isupport: ✔️ 1 successful (1 skipped)
      • kick: ✔️ 7 successful (2 skipped)
      • labeled_responses: ✔️ 13 successful (13 skipped)
      • message_tags: ✔️ 2 successful (2 skipped)
      • messages:
        • PrivmsgServermaskTestCase:
          • testPrivmsgServermask: ❌ 1 failed:
            • irctest.exceptions.NoMessageException
          • testPrivmsgServermaskNoMatch: ❌ 1 failed:
            • AssertionError: [Message(tags={}, prefix='My.Little.Server', command='NOTICE', params=['sender', 'The command PRIVMSG $*.foobar is no longer supported, please use $$*.foobar'])] assert 1 == 0
          • testPrivmsgServermaskStar: ❌ 1 failed:
            • irctest.exceptions.NoMessageException
          • testPrivmsgServermaskNotOper: ✔️ 1 successful
        • TagsTestCase: ✔️ 1 successful (1 skipped)
        • (others): ✔️ 4 successful
      • monitor: ✔️ 10 successful (10 skipped)
      • multiline: ✔️ 2 successful (2 skipped)
      • register_verify: ✔️ 4 successful (4 skipped)
      • regressions: ✔️ 7 successful (1 skipped)
      • statusmsg: ✔️ 2 successful (1 skipped)
      • chmodes: ✔️ 10 successful (3 skipped)
      • (others): ✔️ 62 successful
    • irctest::self_tests: ✔️ 49 successful
  • artifacts/pytest results solanum (stable)/pytest.xml: ✔️ 225 successful (62 skipped)
  • artifacts/pytest results sopel (stable)/pytest.xml: ✔️ 62 successful (8 skipped)
  • artifacts/pytest results unrealircd (stable)/pytest.xml: ✔️ 179 successful (17 skipped)
  • artifacts/pytest results unrealircd-anope (stable)/pytest.xml: ✔️ 20 successful (5 skipped)
  • artifacts/pytest results unrealircd-atheme (stable)/pytest.xml: ✔️ 22 successful (7 skipped)

@progval
Copy link
Owner Author

progval commented Nov 20, 2021

It's a clusterfuck, I give up

@progval progval closed this Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked by: Modern waiting for a PR/issue in the modern-irc spec
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant