aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCara Salter <cara@devcara.com>2023-11-21 16:10:08 -0500
committerCara Salter <cara@devcara.com>2023-11-21 16:10:08 -0500
commitf78c7cf82726324fcee6b738e3d670bee02ad3ff (patch)
treeece037cba4f701f67f22bdbd8f916f66a0e08036 /src
parentbe5e0dd226a29d1d45f94d02bb63c64defbe33fd (diff)
download142bot-master.tar.gz
142bot-master.zip
autotoolsHEADmaster
no more cmake!
Diffstat (limited to 'src')
-rw-r--r--src/142bot_config.h.in63
-rw-r--r--src/bot.cpp2
-rw-r--r--src/main.cpp8
3 files changed, 70 insertions, 3 deletions
diff --git a/src/142bot_config.h.in b/src/142bot_config.h.in
new file mode 100644
index 0000000..035955f
--- /dev/null
+++ b/src/142bot_config.h.in
@@ -0,0 +1,63 @@
+/* src/142bot_config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
+#undef LT_OBJDIR
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if all of the C90 standard headers exist (not just the ones
+ required in a freestanding environment). This macro is provided for
+ backward compatibility; new code need not use it. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
diff --git a/src/bot.cpp b/src/bot.cpp
index d3bd6b7..35592a0 100644
--- a/src/bot.cpp
+++ b/src/bot.cpp
@@ -352,4 +352,4 @@ void Bot::onSlashCommand(const dpp::slashcommand_t &event) {
void Bot::onFormSubmit(const dpp::form_submit_t &event) {
FOREACH_MOD(I_OnFormSubmit, OnFormSubmit(event));
-} \ No newline at end of file
+}
diff --git a/src/main.cpp b/src/main.cpp
index 6ce5858..b22460c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,13 +1,16 @@
+#include <curl/curl.h>
#include <dpp/dpp.h>
#include <dpp/json.h>
#include <142bot/bot.hpp>
#include <142bot/db.hpp>
+#include <fmt/core.h>
#include <spdlog/spdlog.h>
#include <spdlog/async.h>
#include <spdlog/sinks/stdout_color_sinks.h>
#include <spdlog/sinks/rotating_file_sink.h>
#include <string>
+#include <fmt/format.h>
#include <sentry.h>
@@ -23,15 +26,16 @@ int main(int argc, char const *argv[]) {
std::ifstream f("config.json");
json cfg = json::parse(f);
+ curl_global_init(CURL_GLOBAL_ALL);
string token = cfg.value("token", "bad-token");
sentry_options_t *options = sentry_options_new();
sentry_options_set_dsn(options, cfg.value("sentry_dsn", "").c_str());
// This is also the default-path. For further information and recommendations:
// https://docs.sentry.io/platforms/native/configuration/options/#database-path
sentry_options_set_database_path(options, ".sentry-native");
- sentry_options_set_release(options, "142bot@" + onefortytwobot_VERSION_MAJOR + '.' + onefortytwobot_VERSION_MINOR);
+ sentry_options_set_release(options, fmt::format("142bot@{}", PACKAGE_VERSION).c_str());
sentry_options_set_debug(options, 0);
- sentry_options_set_environment(options, onefortytwobot_env);
+ sentry_options_set_environment(options, "production");
sentry_options_set_symbolize_stacktraces(options, 1);
sentry_init(options);
dpp::cluster bot(token, dpp::intents::i_all_intents);