emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/rcirc-update 88b6237 5/7: * rcirc.texi: Document rcirc-nick-filt


From: Philip Kaludercic
Subject: feature/rcirc-update 88b6237 5/7: * rcirc.texi: Document rcirc-nick-filter and rcirc-channel-filter
Date: Sat, 11 Sep 2021 11:06:46 -0400 (EDT)

branch: feature/rcirc-update
commit 88b623772b35177ab8e76601e6a040bb317bde4c
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    * rcirc.texi: Document rcirc-nick-filter and rcirc-channel-filter
---
 doc/misc/rcirc.texi | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/doc/misc/rcirc.texi b/doc/misc/rcirc.texi
index dc08a22..5e157ec 100644
--- a/doc/misc/rcirc.texi
+++ b/doc/misc/rcirc.texi
@@ -935,6 +935,37 @@ because @code{defun-rcirc-command} is not yet available, 
and without
                          (concat "I use " rcirc-id-string))))
 @end smallexample
 
+@node Using rcirc with bouncers
+@section Using rcirc with bouncers
+@cindex bouncer
+
+Some bouncers multiplex connections to various servers, but have to
+modify nicks and channel names to make this work. The channel
+@code{#emacs} on @code{irc.libera.chat} becomes
+@code{#emacs/irc.libera.chat}.
+
+@vindex rcirc-nick-filter
+@vindex rcirc-channel-filter
+The options @code{rcirc-nick-filter} and @code{rcirc-channel-filter}
+can be used to make this feel more natural. When set to functions,
+these will be used to change how nicks and channel names are
+displayed. A simple configuration to fix the above example might be:
+
+@smallexample
+(defun my/rcirc-remove-suffix (STR)
+  "Remove suffixes from STR."
+  (save-match-data
+    (if (string-match "/[[:alpha:]]+?\\'" str)
+        (substring str 0 (match-beginning 0))
+      str)))
+
+(setq rcirc-nick-filter #'my/rcirc-remove-suffix
+      rcirc-channel-filter #'local/rcirc-soju-suffix)
+@end smallexample
+
+The effect is that buffer names, nicks in messages, nick-completion
+all strip away the suffix introduced by the bouncer.
+
 @node GNU Free Documentation License
 @appendix GNU Free Documentation License
 @include doclicense.texi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]