summaryrefslogtreecommitdiff
path: root/doc/misc/rcirc.texi
diff options
context:
space:
mode:
authorPhilip Kaludercic <philipk@posteo.net>2021-09-11 16:37:42 +0200
committerPhilip Kaludercic <philipk@posteo.net>2021-09-11 16:37:42 +0200
commit88b623772b35177ab8e76601e6a040bb317bde4c (patch)
treeaa21994a0f5d59d187af85a8e26586caccec8ff7 /doc/misc/rcirc.texi
parent0d087458067ee7cd84a6b02354a7fdba971a5015 (diff)
downloademacs-88b623772b35177ab8e76601e6a040bb317bde4c.tar.gz
* rcirc.texi: Document rcirc-nick-filter and rcirc-channel-filter
Diffstat (limited to 'doc/misc/rcirc.texi')
-rw-r--r--doc/misc/rcirc.texi31
1 files changed, 31 insertions, 0 deletions
diff --git a/doc/misc/rcirc.texi b/doc/misc/rcirc.texi
index dc08a222d86..5e157ec57e3 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