]> git.eshelyaron.com Git - emacs.git/commitdiff
Add format-catalog entry for unknown chan mode in ERC
authorF. Jason Park <jp@neverwas.me>
Fri, 3 May 2024 03:16:07 +0000 (20:16 -0700)
committerEshel Yaron <me@eshelyaron.com>
Thu, 9 May 2024 06:41:18 +0000 (08:41 +0200)
* lisp/erc/erc.el (erc--process-channel-modes): Use format spec
catalog entry, and convert char to string.
(erc-message-english-channel-mode-unknown): New variable.
;; * test/lisp/erc/erc-scenarios-base-renick.el
;; (erc-scenarios-base-renick-queries-solo): Adjust timeout.
;; * test/lisp/erc/erc-scenarios-ignore.el (erc-scenarios-ignore/basic):
;; Adjust timeouts.
;; * test/lisp/erc/erc-scenarios-misc.el (erc-scenarios-base-flood):
;; Adjust timeouts.
;; * test/lisp/erc/resources/base/assoc/bouncer-history/barnet.eld:
;; Adjust timeouts.
;; * test/lisp/erc/resources/base/reuse-buffers/channel/barnet.eld:
;; Adjust timeouts.
;; * test/lisp/erc/resources/erc-d/erc-d-tests.el (erc-d-run-basic):
;; Adjust timeouts.
;; * test/lisp/erc/resources/sasl/plain.eld: Adjust timeouts.
;; * test/lisp/erc/resources/sasl/external.eld: Adjust timeout.
;; * test/lisp/erc/resources/base/auth-source/foonet.eld: Adjust
;; timeout.

(cherry picked from commit caddc4e727a46e6b6ec7146c9e1cdc7b954f5c16)

lisp/erc/erc.el
test/lisp/erc/erc-scenarios-base-renick.el
test/lisp/erc/erc-scenarios-ignore.el
test/lisp/erc/erc-scenarios-misc.el
test/lisp/erc/resources/base/assoc/bouncer-history/barnet.eld
test/lisp/erc/resources/base/auth-source/foonet.eld
test/lisp/erc/resources/base/reuse-buffers/channel/barnet.eld
test/lisp/erc/resources/erc-d/erc-d-tests.el
test/lisp/erc/resources/join/auth-source/foonet.eld
test/lisp/erc/resources/sasl/external.eld
test/lisp/erc/resources/sasl/plain.eld

index e37b28669a400cd66c50bf898e5728ba901d1671..ce805fdab13a44dfdf1844b0ce259b01dcb365cd 100644 (file)
@@ -7473,7 +7473,7 @@ complement relevant letters in STRING."
                t))
             ((not fallbackp)
              (erc-display-message nil '(notice error) (erc-server-buffer)
-                                  (format "Unknown channel mode: %S" c)))))
+                                  'channel-mode-unknown ?c (string c)))))
     (setq erc-channel-modes (sort erc-channel-modes #'string<))
     (setq erc--mode-line-mode-string
           (concat "+" (erc--channel-modes erc--mode-line-chanmodes-arg-len)))
@@ -9404,6 +9404,7 @@ SOFTP, only do so when defined as a variable."
    (incorrect-args . "Incorrect arguments. Usage:\n%c %u\n%d")
    (cannot-find-file . "Cannot find file %f")
    (cannot-read-file . "Cannot read file %f")
+   (channel-mode-unknown . "Unknown channel mode: %c")
    (connect . "Connecting to %S:%p... ")
    (country . "%c")
    (country-unknown . "%d: No such domain")
index 35f37a0159e07e80c02d522a57424b6a7197083b..3001fde6da007d73eb56df8bc301916aa5e327e4 100644 (file)
 
     (ert-info ("Joined by bouncer to #foo, pal persent")
       (with-current-buffer (erc-d-t-wait-for 1 (get-buffer "#foo"))
-        (erc-d-t-search-for 1 "On Thursday")
+        (erc-d-t-search-for 5 "On Thursday")
         (erc-scenarios-common-say "hi")))
 
     (erc-d-t-wait-for 10 "Query buffer appears with message from pal"
index 1142bbef14d3ee9d05633b8b457d30568afcf187..55be613b51bb1ee71537113566a3500e3aec454e 100644 (file)
@@ -62,8 +62,8 @@
       (funcall expect 10 "ignoring alice for 1m0s")
       (funcall expect 10 "<bob> alice: Signior Iachimo")
       (erc-scenarios-common-say "/ignore")
-      (funcall expect 10 "alice    59s")
-      (funcall expect 10 "mike     59m59s")
+      (funcall expect 20 '(: "alice    5" (any "0-9") "s"))
+      (funcall expect 10 '(: "mike     59m5" (any "0-9") "s"))
       (funcall expect -0.1 "<alice>")
       (funcall expect 10 "<bob> alice: The ground is bloody")
       (erc-scenarios-common-say "/unignore alice")
index 2afa1ce67a4215b4391013a594826fefd0a04d0d..4cb5e65b15a643d063f418d9d072688a661f5946 100644 (file)
@@ -49,7 +49,7 @@
 
     (ert-info ("#chan@foonet exists")
       (with-current-buffer (erc-d-t-wait-for 5 (get-buffer "#chan/foonet"))
-        (erc-d-t-search-for 2 "<bob/foonet>")
+        (erc-d-t-search-for 10 "<bob/foonet>")
         (erc-d-t-absent-for 0.1 "<joe")
         (funcall expect 3 "was created on")))
 
@@ -58,7 +58,7 @@
         (erc-d-t-search-for 2 "<joe/barnet>")
         (erc-d-t-absent-for 0.1 "<bob")
         (funcall expect 3 "was created on")
-        (funcall expect 5 "To get good guard")))
+        (funcall expect 10 "To get good guard")))
 
     (ert-info ("Message not held in queue limbo")
       (with-current-buffer "#chan/foonet"
index 060f4178723505e9a5f0d3870360186c81cd8fae..5e7ac8afb418e181d09565dc84e18dac2d1dd07a 100644 (file)
@@ -1,5 +1,5 @@
 ;; -*- mode: lisp-data; -*-
-((pass 3 "PASS :barnet:changeme"))
+((pass 10 "PASS :barnet:changeme"))
 ((nick 1 "NICK tester"))
 ((user 1 "USER user 0 * :tester")
  (0 ":irc.barnet.org 001 tester :Welcome to the barnet IRC Network tester")
index 1fe772c7e23da4cf4f9ddace3bc3387dd160f2fe..31ddccbdaee93ccd1dfe10a67fd95d783bb0ab16 100644 (file)
@@ -1,5 +1,5 @@
 ;; -*- mode: lisp-data; -*-
-((pass 1 "PASS :changeme"))
+((pass 10 "PASS :changeme"))
 ((nick 1 "NICK tester"))
 ((user 1 "USER user 0 * :tester")
  (0 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester")
index d106a45cf66913fce01b7482261b55044095e888..17f3cfd72b15536d86d9fd1d93bd128cb6217167 100644 (file)
@@ -34,7 +34,7 @@
  (0 ":irc.barnet.org NOTICE tester :[09:05:35] This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.")
  (0 ":irc.barnet.org 305 tester :You are no longer marked as being away"))
 
-((mode 3 "MODE #chan")
+((mode 10 "MODE #chan")
  (0 ":irc.barnet.org 324 tester #chan +nt")
  (0 ":irc.barnet.org 329 tester #chan 1620205534")
  (0.1 ":mike!~u@wvys46tx8tpmk.irc PRIVMSG #chan :joe: That will be given to the loudest noise we make.")
index a6357c90f036101650c4bfe2a7baf496970ed3fe..dd0d5f8cb87770f97c0c5467cf9e860ed2cbab52 100644 (file)
@@ -644,7 +644,7 @@ nonzero for this to work."
 (ert-deftest erc-d-run-basic ()
   :tags '(:expensive-test)
   (erc-d-tests-with-server (_ _) basic
-    (with-current-buffer (erc-d-t-wait-for 3 (get-buffer "#chan"))
+    (with-current-buffer (erc-d-t-wait-for 10 (get-buffer "#chan"))
       (erc-d-t-search-for 2 "hey"))
     (when noninteractive
       (kill-buffer "#chan"))))
index 32b9e3fa0b6eaebac0240f04e9842edbfe5e3b4e..60dff350654c1548788c50542268dafa96781db1 100644 (file)
@@ -26,7 +26,7 @@
 ((join 6.47 "JOIN #spam secret")
  (0.03 ":dummy!~u@w9rfqveugz722.irc JOIN #spam"))
 
-((mode 1 "MODE #spam")
+((mode-spam 10 "MODE #spam")
  (0.01 ":irc.foonet.org 353 dummy = #spam :~tester dummy")
  (0.00 ":irc.foonet.org 366 dummy #spam :End of NAMES list")
  (0.01 ":irc.foonet.org 324 dummy #spam +knt secret")
index 2cd237ec4d4445b209333bd20c73adae38d4e1b5..c3e51a8cd6fa71af4f779997082ec6d6b03a6d20 100644 (file)
@@ -28,6 +28,6 @@
  (0.21 ":irc.example.org 266 tester 1 1 :Current global users 1, max 1")
  (0.0 ":irc.example.org 422 tester :MOTD File is missing"))
 
-((mode-user 1.2 "MODE tester +i")
+((mode-user 10 "MODE tester +i")
  (0.0 ":irc.example.org 221 tester +Zi")
  (0.0 ":irc.example.org NOTICE tester :This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect."))
index 1341cd78e5e04067df26bd708c1bb5ea08faf677..aa5f3e80feb3e387d5abc7c69e8b333bc5938def 100644 (file)
@@ -30,7 +30,7 @@
  (0.21 ":irc.example.org 266 tester 1 1 :Current global users 1, max 1")
  (0.0 ":irc.example.org 422 tester :MOTD File is missing"))
 
-((mode-user 1.2 "MODE tester +i")
+((mode-user 10 "MODE tester +i")
  (0.0 ":irc.example.org 221 tester +Zi")
  (0.0 ":irc.example.org NOTICE tester :This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect."))