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
27 lines
526 B
C++
27 lines
526 B
C++
#ifndef EMPTY_IF_FIXED_SERVER_HPP_INCLUDED
|
|
#define EMPTY_IF_FIXED_SERVER_HPP_INCLUDED
|
|
|
|
#include <string>
|
|
|
|
#include <config/config.hpp>
|
|
|
|
namespace utils
|
|
{
|
|
inline std::string empty_if_fixed_server(std::string&& str)
|
|
{
|
|
if (!Config::get("fixed_irc_server", "").empty())
|
|
return {};
|
|
return str;
|
|
}
|
|
|
|
inline std::string empty_if_fixed_server(const std::string& str)
|
|
{
|
|
if (!Config::get("fixed_irc_server", "").empty())
|
|
return {};
|
|
return str;
|
|
}
|
|
|
|
}
|
|
|
|
#endif /* EMPTY_IF_FIXED_SERVER_HPP_INCLUDED */
|