Compare commits

...

2 Commits

Author SHA1 Message Date
Brett 531dcad0ef git 2024-05-01 20:15:47 -04:00
Brett 8ca286d9ec push the silly 2024-05-01 19:39:03 -04:00
3 changed files with 27 additions and 1 deletions

View File

@ -8,6 +8,10 @@ option(ENABLE_TSAN "Enable the thread data race sanitizer" OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
#cmake_policy(SET CMP0069 NEW)
#include(CheckIPOSupported)
#check_ipo_supported(RESULT supported OUTPUT error)
#set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") #set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
#set(BUILD_SHARED_LIBS OFF) #set(BUILD_SHARED_LIBS OFF)
#set(POSITION_INDEPENDENT_CODE ON) #set(POSITION_INDEPENDENT_CODE ON)
@ -22,6 +26,14 @@ add_subdirectory(libs/sqlite_orm-1.8.2)
find_package(CURL) find_package(CURL)
if( supported )
message(STATUS "IPO / LTO enabled")
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
set_property(TARGET BLT PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
else()
message(STATUS "IPO / LTO not supported: <${error}>")
endif()
include_directories(include/) include_directories(include/)
file(GLOB_RECURSE PROJECT_BUILD_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp") file(GLOB_RECURSE PROJECT_BUILD_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")

@ -1 +1 @@
Subproject commit 9ad652195b0a69f9977d313eff4dd01a7890f1df Subproject commit 9db3f120489ff27aa560e488d82b5ae0d64019df

View File

@ -78,6 +78,11 @@ struct db_obj
return db.count<message_t>(); return db.count<message_t>();
} }
inline auto message_count(blt::u64 channel, blt::u64 time)
{
}
inline auto users() inline auto users()
{ {
return db.count<user_info_t>(); return db.count<user_info_t>();
@ -593,6 +598,15 @@ int main(int argc, const char** argv)
&dpp::message_create_t::send, &dpp::message_create_t::send,
dpp::utility::log_error()); dpp::utility::log_error());
} }
if (blt::string::starts_with(event.msg.content, "!stats"))
{
discord_message message;
BLT_TRACE(message.get());
message.send<const std::string&, dpp::command_completion_event_t>(event,
&dpp::message_create_t::send,
dpp::utility::log_error());
}
if (blt::string::starts_with(event.msg.content, "!messages")) if (blt::string::starts_with(event.msg.content, "!messages"))
{ {
for (auto& db : databases) for (auto& db : databases)