diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/command/commandHandler.cpp | 4 | ||||
| -rw-r--r-- | src/command/commandHandler.hpp | 4 | ||||
| -rw-r--r-- | src/command/commands.cpp | 4 | ||||
| -rw-r--r-- | src/core/chatManager.cpp | 2 | ||||
| -rw-r--r-- | src/core/chatManager.hpp | 6 | ||||
| -rw-r--r-- | src/core/chatServer.cpp | 6 | ||||
| -rw-r--r-- | src/core/server.cpp | 2 | ||||
| -rw-r--r-- | src/core/server.hpp | 2 | ||||
| -rw-r--r-- | src/core/session.cpp | 4 | ||||
| -rw-r--r-- | src/core/session.hpp | 20 | ||||
| -rw-r--r-- | src/core/sessionManager.cpp | 4 | ||||
| -rw-r--r-- | src/io/IOManager.cpp | 2 | ||||
| -rw-r--r-- | src/io/inputManager.cpp | 4 | ||||
| -rw-r--r-- | src/io/inputManager.hpp | 2 | ||||
| -rw-r--r-- | src/io/renderManager.hpp | 2 | ||||
| -rw-r--r-- | src/io/scroller.cpp | 2 |
16 files changed, 35 insertions, 35 deletions
diff --git a/src/command/commandHandler.cpp b/src/command/commandHandler.cpp index 3baeeb1..45306c2 100644 --- a/src/command/commandHandler.cpp +++ b/src/command/commandHandler.cpp @@ -1,8 +1,8 @@ #include "commandHandler.hpp" -#include "../debug/log.hpp" #include "../core/session.hpp" -#include <algorithm> +#include "../debug/log.hpp" #include "../misc/memory.hpp" +#include <algorithm> CCommandHandler::CCommandHandler() { log(LOG, "CommandHandler: initialized"); diff --git a/src/command/commandHandler.hpp b/src/command/commandHandler.hpp index 5a8636f..51dcaa0 100644 --- a/src/command/commandHandler.hpp +++ b/src/command/commandHandler.hpp @@ -1,9 +1,9 @@ #pragma once #include "../core/session.hpp" +#include "../misc/memory.hpp" #include <any> #include <functional> -#include "../misc/memory.hpp" #include <netinet/in.h> #include <string> #include <vector> @@ -64,7 +64,7 @@ class CCommandHandler { private: SP<CCommandHandler::SCommand> getCommand(const std::string &command) const; - SResult exeCommand(const SP<SCommand> command, const std::string &args) const; + SResult exeCommand(const SP<SCommand> command, const std::string &args) const; std::vector<SP<SCommand>> m_vCommands; }; diff --git a/src/command/commands.cpp b/src/command/commands.cpp index 6f3db68..d510fe4 100644 --- a/src/command/commands.cpp +++ b/src/command/commands.cpp @@ -1,8 +1,8 @@ #include "commands.hpp" -#include "commandHandler.hpp" +#include "../core/sessionManager.hpp" #include "../debug/format.hpp" #include "../debug/log.hpp" -#include "../core/sessionManager.hpp" +#include "commandHandler.hpp" #define NOREASON "No reason specified"; diff --git a/src/core/chatManager.cpp b/src/core/chatManager.cpp index e981e7f..e8e4d5f 100644 --- a/src/core/chatManager.cpp +++ b/src/core/chatManager.cpp @@ -1,7 +1,7 @@ #include "chatManager.hpp" +#include "../debug/log.hpp" #include "../io/IOManager.hpp" #include "../io/inputManager.hpp" -#include "../debug/log.hpp" #include "sessionManager.hpp" CChatManager::CChatManager() { diff --git a/src/core/chatManager.hpp b/src/core/chatManager.hpp index d109424..6e1d5a2 100644 --- a/src/core/chatManager.hpp +++ b/src/core/chatManager.hpp @@ -12,10 +12,10 @@ class CChatManager { CChatManager(); ~CChatManager(); struct SMessage { - std::string msg; - std::string username; + std::string msg; + std::string username; std::optional<WP<CSession>> sender = std::nullopt; - bool admin = false; + bool admin = false; }; void newMessage(const SMessage &msg); std::string fmtBroadcastMessage(const SMessage &msg); diff --git a/src/core/chatServer.cpp b/src/core/chatServer.cpp index 4a16c56..8788301 100644 --- a/src/core/chatServer.cpp +++ b/src/core/chatServer.cpp @@ -1,11 +1,11 @@ #include "chatServer.hpp" -#include "../io/IOManager.hpp" -#include "chatManager.hpp" #include "../command/commandHandler.hpp" #include "../command/commands.hpp" -#include "../io/inputManager.hpp" #include "../debug/log.hpp" +#include "../io/IOManager.hpp" +#include "../io/inputManager.hpp" #include "../io/renderManager.hpp" +#include "chatManager.hpp" #include "server.hpp" #include "sessionManager.hpp" diff --git a/src/core/server.cpp b/src/core/server.cpp index 10eb4dd..d84a38f 100644 --- a/src/core/server.cpp +++ b/src/core/server.cpp @@ -1,7 +1,7 @@ #include "server.hpp" #include "../debug/log.hpp" -#include <cstring> #include "../misc/memory.hpp" +#include <cstring> #include <sys/socket.h> CServer::CServer(uint16_t port) diff --git a/src/core/server.hpp b/src/core/server.hpp index ea0e15b..866f141 100644 --- a/src/core/server.hpp +++ b/src/core/server.hpp @@ -12,7 +12,7 @@ class CServer { private: SP<CFileDescriptor> m_sockfd; - sockaddr_in m_addr; + sockaddr_in m_addr; mutable std::mutex m_mutex; }; diff --git a/src/core/session.cpp b/src/core/session.cpp index c8cceb0..3b6eacb 100644 --- a/src/core/session.cpp +++ b/src/core/session.cpp @@ -1,15 +1,15 @@ #include "session.hpp" -#include "chatManager.hpp" #include "../command/commandHandler.hpp" #include "../debug/format.hpp" #include "../debug/log.hpp" +#include "../misc/memory.hpp" +#include "chatManager.hpp" #include "server.hpp" #include "sessionManager.hpp" #include <algorithm> #include <arpa/inet.h> #include <cerrno> #include <cstring> -#include "../misc/memory.hpp" #include <optional> #include <sys/socket.h> diff --git a/src/core/session.hpp b/src/core/session.hpp index 9a953fc..5ca193c 100644 --- a/src/core/session.hpp +++ b/src/core/session.hpp @@ -1,10 +1,10 @@ #pragma once +#include "../debug/format.hpp" #include "../misc/FileDescriptor.hpp" +#include "../misc/memory.hpp" #include "chatManager.hpp" -#include "../debug/format.hpp" #include <format> -#include "../misc/memory.hpp" #include <netinet/in.h> #include <optional> #include <string> @@ -33,7 +33,7 @@ class CSession { UP<SRecvData> read(); UP<SRecvData> read(const std::string &msg, bool bypassDeaf = false); - bool write(const std::string &msg); + bool write(const std::string &msg); template <typename... Args> bool write(std::format_string<Args...> fmt, Args &&...args); template <typename... Args> @@ -57,14 +57,14 @@ class CSession { WRITE }; - WP<CSession> self; + WP<CSession> self; SP<CFileDescriptor> m_sockfd; - sockaddr_in m_addr; - socklen_t m_addrLen = sizeof(m_addr); - std::string m_name; - std::string m_ip; - int m_port; - bool m_isAdmin = false; + sockaddr_in m_addr; + socklen_t m_addrLen = sizeof(m_addr); + std::string m_name; + std::string m_ip; + int m_port; + bool m_isAdmin = false; std::optional<std::string> m_szReading = std::nullopt; bool m_bMuted = false; diff --git a/src/core/sessionManager.cpp b/src/core/sessionManager.cpp index e7a786b..221996d 100644 --- a/src/core/sessionManager.cpp +++ b/src/core/sessionManager.cpp @@ -1,8 +1,8 @@ #include "sessionManager.hpp" -#include "../io/IOManager.hpp" -#include "chatServer.hpp" #include "../debug/format.hpp" #include "../debug/log.hpp" +#include "../io/IOManager.hpp" +#include "chatServer.hpp" #include "session.hpp" #include <algorithm> #include <ranges> diff --git a/src/io/IOManager.cpp b/src/io/IOManager.cpp index be29adf..ce7db5d 100644 --- a/src/io/IOManager.cpp +++ b/src/io/IOManager.cpp @@ -1,6 +1,6 @@ #include "IOManager.hpp" -#include "inputManager.hpp" #include "../debug/log.hpp" +#include "inputManager.hpp" CIOManager::CIOManager() { log(LOG, "IOManager: initialized"); diff --git a/src/io/inputManager.cpp b/src/io/inputManager.cpp index 09a7729..4f508c8 100644 --- a/src/io/inputManager.cpp +++ b/src/io/inputManager.cpp @@ -1,8 +1,8 @@ #include "inputManager.hpp" -#include "IOManager.hpp" -#include "../core/chatManager.hpp" #include "../command/commandHandler.hpp" +#include "../core/chatManager.hpp" #include "../debug/log.hpp" +#include "IOManager.hpp" #include "renderManager.hpp" #include "scroller.hpp" diff --git a/src/io/inputManager.hpp b/src/io/inputManager.hpp index a794ae9..33d40be 100644 --- a/src/io/inputManager.hpp +++ b/src/io/inputManager.hpp @@ -1,7 +1,7 @@ #pragma once -#include <ftxui/component/component.hpp> #include "../misc/memory.hpp" +#include <ftxui/component/component.hpp> class CInputManager { public: diff --git a/src/io/renderManager.hpp b/src/io/renderManager.hpp index 3643f3c..474b060 100644 --- a/src/io/renderManager.hpp +++ b/src/io/renderManager.hpp @@ -1,7 +1,7 @@ #pragma once -#include <ftxui/component/screen_interactive.hpp> #include "../misc/memory.hpp" +#include <ftxui/component/screen_interactive.hpp> class CRenderManager { public: diff --git a/src/io/scroller.cpp b/src/io/scroller.cpp index 9fd1427..63d0b09 100644 --- a/src/io/scroller.cpp +++ b/src/io/scroller.cpp @@ -1,10 +1,10 @@ #include "scroller.hpp" #include "../debug/log.hpp" +#include "../misc/memory.hpp" // for shared_ptr, allocator, __shared_ptr_access #include <algorithm> // for max, min #include <ftxui/component/component_base.hpp> // for Component, ComponentBase #include <ftxui/component/event.hpp> // for Event, Event::ArrowDown, Event::ArrowUp, Event::End, Event::Home, Event::PageDown, Event::PageUp -#include "../misc/memory.hpp" // for shared_ptr, allocator, __shared_ptr_access #include <utility> // for move #include "ftxui/component/component.hpp" // for Make |
