Add support for a fixed_irc_server configuration

This option lets the administrator choose a specific IRC server, and only
that server can be used with this biboumi instance.

In this mode, JIDs to use are changed like this:

- #chan%irc.example.com@biboumi.example.com      -> #chan@biboumi.example.com
- user!irc.example.com@biboumi.example.com       -> user!@biboumi.example.com
- #chan%irc.example.com@biboumi.example.com/Nick -> #chan@biboumi.example.com/Nick
- %irc.example.com@biboumi.example.com           -> no equivalent
- irc.example.com@biboumi.example.com            -> no equivalent
This commit is contained in:
Florent Le Coz
2015-02-25 18:35:30 +01:00
parent 1c43c3af4c
commit 2df0ebf2df
7 changed files with 191 additions and 34 deletions
+14
View File
@@ -59,6 +59,20 @@ The configuration file uses a simple format of the form
privileges), for example some administration ad-hoc commands will only be
available to that JID.
`fixed_irc_server`
If this option contains the hostname of an IRC server (for example
irc.example.org), then biboumi will enforce the connexion to that IRC
server only. This means that a JID like "#chan@irc.biboumi.org" must be
used instead of "#chan%irc.example.org@irc.biboumi.org". In that mode,
the virtual channel (see *Connect to an IRC server*) is not available and
you still need to use the ! separator to send message to an IRC user (for
example "foo!@biboumi.example.com" to send a message to foo), although the
in-room JID still work as expected ("#channel@biboumi.example.com/Nick").
This option can for example be used by an administrator that just wants to
let their users join their own IRC server using an XMPP client, but
without letting them join any other IRC servers on the internet.
`log_file`
A filename into which logs are written. If none is provided, the logs are