From 61974e6d0c726647805740bc9b35e90e0dd04063 Mon Sep 17 00:00:00 2001
From: Valentin Lorentz <progval+git@progval.net>
Date: Sun, 4 Jul 2021 00:06:26 +0200
Subject: [PATCH] Enable mute extban tests on Ergo

---
 irctest/controllers/ergo.py                     | 1 +
 irctest/server_tests/test_channel_operations.py | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/irctest/controllers/ergo.py b/irctest/controllers/ergo.py
index 71e8153..ada1ed6 100644
--- a/irctest/controllers/ergo.py
+++ b/irctest/controllers/ergo.py
@@ -137,6 +137,7 @@ class ErgoController(BaseServerController, DirectoryBasedController):
     _port_wait_interval = 0.01
     supported_sasl_mechanisms = {"PLAIN"}
     supports_sts = True
+    extban_mute_char = "m"
 
     def create_config(self) -> None:
         super().create_config()
diff --git a/irctest/server_tests/test_channel_operations.py b/irctest/server_tests/test_channel_operations.py
index e0b3e54..6b66957 100644
--- a/irctest/server_tests/test_channel_operations.py
+++ b/irctest/server_tests/test_channel_operations.py
@@ -1310,7 +1310,7 @@ class MuteExtban(cases.BaseServerTestCase):
         isupport = self.server_support
         token = isupport["EXTBAN"]
         prefix, comma, types = token.partition(",")
-        self.assertIn(self.char, types, f"Missing '{self.char()}' in ISUPPORT EXTBAN")
+        self.assertIn(self.char(), types, f"Missing '{self.char()}' in ISUPPORT EXTBAN")
         self.assertEqual(prefix, "")
         self.assertEqual(comma, ",")
 
@@ -1350,7 +1350,7 @@ class MuteExtban(cases.BaseServerTestCase):
                 "bar",
                 "#chan",
                 f"{prefix}{self.char()}:bar!*@*",
-                "chanop",
+                StrRe("chanop(!.*)?"),
                 *ANYLIST,
             ],
         )