summaryrefslogtreecommitdiff
path: root/src/utils/empty_if_fixed_server.hpp
blob: 2422ee4f4a0f63afbbf4d26df35b34e972e0ea94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once


#include <string>

#include <config/config.hpp>

namespace utils
{
  inline const std::string& empty_if_fixed_server(const std::string& str)
  {
    static const std::string empty{};
    if (!Config::get("fixed_irc_server", "").empty())
      return empty;
    return str;
  }

}