~singpolyma/biboumi

ref: ffb402f0adb9f808c7b8bc9616e71f7b3f8931ac biboumi/src/utils/empty_if_fixed_server.hpp -rw-r--r-- 407 bytes
ffb402f0 — louiz’ Drop support for botan < 2.0 5 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once


#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;
  }

}