diff --git a/include/module.h b/include/module.h index c40756b..0564236 100644 --- a/include/module.h +++ b/include/module.h @@ -6,9 +6,9 @@ class Module { public: Module() { } virtual ~Module() { } - virtual void OnIRCRaw(Line line) { } - virtual void OnPrivateMessage(Hostmask source, std::string message) { } - virtual void OnChannelMessage(Hostmask source, std::string channel, std::string message) { } - virtual void OnIRCCommand(Hostmask source, std::string target, std::string cmd, std::vector args) { } + virtual void OnIRCRaw(Line line) { UNUSED(line); } + virtual void OnPrivateMessage(Hostmask source, std::string message) { UNUSED(source); UNUSED(message); } + virtual void OnChannelMessage(Hostmask source, std::string channel, std::string message) { UNUSED(source); UNUSED(channel); UNUSED(message); } + virtual void OnIRCCommand(Hostmask source, std::string target, std::string cmd, std::vector args) { UNUSED(source); UNUSED(target); UNUSED(cmd); UNUSED(args); } Bot *bot; }; \ No newline at end of file diff --git a/include/utils.h b/include/utils.h index d5d1924..23cf3ba 100644 --- a/include/utils.h +++ b/include/utils.h @@ -2,4 +2,6 @@ #include #include +#define UNUSED(param) (void)param + std::vector split_string(std::string str, std::string delimiter); \ No newline at end of file diff --git a/modules/include/m_test.h b/modules/include/m_test.h index 401ee29..edfe01e 100644 --- a/modules/include/m_test.h +++ b/modules/include/m_test.h @@ -1,6 +1,7 @@ #pragma once #include +#include "utils.h" #include "module.h" using std::cout; diff --git a/src/botframe.cpp b/src/botframe.cpp index aba3051..069c55c 100644 --- a/src/botframe.cpp +++ b/src/botframe.cpp @@ -1,6 +1,6 @@ #include "botframe.h" -Bot::Bot() : config("bot.config"), cmd_prefix("!") { +Bot::Bot() : cmd_prefix("!"), config("bot.config") { std::string host; int port; diff --git a/src/main.cpp b/src/main.cpp index 462be45..25080b8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,6 +3,7 @@ #include "utils.h" int main(int argc, char *argv[]) { + UNUSED(argc); UNUSED(argv); Bot bot; bot.Go();