diff --git a/core/core.pro b/core/core.pro index 29d0c86..8399589 100644 --- a/core/core.pro +++ b/core/core.pro @@ -66,7 +66,6 @@ HEADERS += include/advertiser.h \ include/ws_proxy.h \ include/http_advertiser.h \ include/logger/u_logger.h \ - include/logger/u_logger_datatypes.h \ include/logger/writer_modcall.h \ include/logger/writer_full.h \ include/logger/writer_sql.h diff --git a/core/include/logger/u_logger.h b/core/include/logger/u_logger.h index 4fba283..27b36a2 100644 --- a/core/include/logger/u_logger.h +++ b/core/include/logger/u_logger.h @@ -22,7 +22,6 @@ #include #include #include "include/config_manager.h" -#include "include/logger/u_logger_datatypes.h" /** * @brief The Universal Logger class to provide a common place to handle, store and write logs to file. @@ -48,43 +47,43 @@ public slots: * @brief Adds an IC log entry to the area buffer and writes it to the respective log format. * @param MessageLog containing client information and the actual message. */ - void logIC(MessageLog f_log); + void logIC(); /** * @brief Adds an OOC log entry to the area buffer and writes it to the respective log format. * @param MessageLog containing client information and the actual message. */ - void logOOC(MessageLog f_log); + void logOOC(); /** * @brief Adds an login attempt to the area buffer and writes it to the respective log format. * @param LoginLog containing info about the login attempt. */ - void logLogin(LoginLog f_log); + void logLogin(); /** * @brief Adds a command usage to the area buffer and writes it to the respective log format. * @param ComandLog containing information about the command and parameter used. */ - void logCMD(CommandLog f_log); + void logCMD(); /** * @brief Adds a player kick to the area buffer and writes it to the respective log format. * @param ModerativeLog containing information about the client kicked and who kicked them. */ - void logKick(ModerativeLog f_log); + void logKick(); /** * @brief Adds a player ban to the area buffer and writes it to the respective log format. * @param ModerativeLog containing information about the client banned and who banned them. */ - void logBan(ModerativeLog f_log); + void logBan(); /** * @brief Logs any connection attempt to the server, wether sucessful or not. * @param ConnectionLog containing information on who connected and if the connection was successful. */ - void logConnectionAttempt(ConnectionLog f_log); + void logConnectionAttempt(); private: diff --git a/core/include/logger/u_logger_datatypes.h b/core/include/logger/u_logger_datatypes.h deleted file mode 100644 index 8105f43..0000000 --- a/core/include/logger/u_logger_datatypes.h +++ /dev/null @@ -1,112 +0,0 @@ -////////////////////////////////////////////////////////////////////////////////////// -// akashi - a server for Attorney Online 2 // -// Copyright (C) 2020 scatterflower // -// // -// This program is free software: you can redistribute it and/or modify // -// it under the terms of the GNU Affero General Public License as // -// published by the Free Software Foundation, either version 3 of the // -// License, or (at your option) any later version. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU Affero General Public License for more details. // -// // -// You should have received a copy of the GNU Affero General Public License // -// along with this program. If not, see . // -////////////////////////////////////////////////////////////////////////////////////// -#ifndef U_LOGGER_DATATYPES_H -#define U_LOGGER_DATATYPES_H - -#include -#include "include/area_data.h" - -/** - * @brief Convenience class to transport IC and OOC messages to the logger. - */ -class MessageLog { -public: - explicit MessageLog(); - struct m_content { - QString charName; - QString oocName; - QString ipid; - QString hdid; - QString message; - AreaData* area; - }; - m_content content; -}; - -/** - * @brief Convenience class to transport information of moderator actions to the logger - * - * @details The only two moderator commands who take advantage of this are ban and kick. - */ -class ModerativeLog { -public: - explicit ModerativeLog(); - struct m_content { - QString moderatorName; - QString ipid; - QString hdid; - QString targetName; - QString targetOOCName; - QString targetIPID; - QString targetHDID; - AreaData* area; - }; - m_content content; -}; - -/** - * @brief Convenience class to transport command usage information to the logger. - */ -class CommandLog { -public: - explicit CommandLog(); - struct m_content { - QString charName; - QString oocName; - QString ipid; - QString hdid; - QString command; - QString cmdArgs; - AreaData* area; - }; - m_content content; -}; - -/** - * @brief Convenience class to transport login attempt information to the logger. - */ -class LoginLog { -public: - explicit LoginLog(); - struct m_content { - QString charName; - QString oocName; - QString ipid; - QString hdid; - bool success; - QString modname; - }; - m_content content; -}; - -/** - * @brief Convenience class to transport connection event information to the logger. - */ -class ConnectionLog { -public: - explicit ConnectionLog(); - struct m_content { - QString ip_address; - QString hdid; - QString ipid; - bool success; - }; - m_content content; -}; - -#endif // U_LOGGER_DATATYPES_H diff --git a/core/src/logger/u_logger.cpp b/core/src/logger/u_logger.cpp index 53ab9bb..e60d285 100644 --- a/core/src/logger/u_logger.cpp +++ b/core/src/logger/u_logger.cpp @@ -23,39 +23,39 @@ ULogger::ULogger(QObject* parent) : } -void ULogger::logIC(MessageLog f_log) +void ULogger::logIC() { - Q_UNUSED(f_log) + } -void ULogger::logOOC(MessageLog f_log) +void ULogger::logOOC() { - Q_UNUSED(f_log) + } -void ULogger::logLogin(LoginLog f_log) +void ULogger::logLogin() { - Q_UNUSED(f_log) + } -void ULogger::logCMD(CommandLog f_log) +void ULogger::logCMD() { - Q_UNUSED(f_log) + } -void ULogger::logKick(ModerativeLog f_log) +void ULogger::logKick() { - Q_UNUSED(f_log) + } -void ULogger::logBan(ModerativeLog f_log) +void ULogger::logBan() { - Q_UNUSED(f_log) + } -void ULogger::logConnectionAttempt(ConnectionLog f_log) +void ULogger::logConnectionAttempt() { - Q_UNUSED(f_log) + } void ULogger::updateAreaBuffer(const QString& f_areaName, const QString& f_entry)