blob: b43770814cfc04e229a0b38f02a1fde6b76f8001 (
plain)
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
27
28
29
30
31
|
#include <iostream>
#include <optional>
#include "commands/command.hpp"
#include "config.hpp"
#include "irc/client.hpp"
int main(int argc, char *argv[]) {
std::cout << "hi world\n";
std::optional<bot::Configuration> o_cfg =
bot::parse_configuration_from_file(".env");
if (!o_cfg.has_value()) {
return -1;
}
bot::Configuration cfg = o_cfg.value();
if (cfg.bot_password.empty() || cfg.bot_username.empty()) {
std::cerr << "*** BOT_USERNAME and BOT_PASSWORD must be set!\n";
return -1;
}
bot::irc::Client client(cfg.bot_username, cfg.bot_password);
bot::command::CommandLoader command_loader;
client.run();
return 0;
}
|