diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-04-28 11:52:04 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2018-04-28 11:53:18 +0200 |
commit | 3b03f87070d91f63f0dc3c7152723727781dcccf (patch) | |
tree | 7b06163f34248d1e632c032cfaf306787675e585 /include/Command.hpp | |
parent | b0bfb8b8d1479502bd5adf17e6a1b94ec00c63ca (diff) |
Add commands, users side panel, improve image download
start using odhtdb
Diffstat (limited to 'include/Command.hpp')
-rw-r--r-- | include/Command.hpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/Command.hpp b/include/Command.hpp new file mode 100644 index 0000000..fe8a947 --- /dev/null +++ b/include/Command.hpp @@ -0,0 +1,17 @@ +#pragma once + +#include <vector> +#include <string> +#include <functional> + +namespace dchat +{ + using CommandHandlerFunc = std::function<void(const std::vector<std::string> &args)>; + + class Command + { + public: + static bool add(const std::string &cmd, CommandHandlerFunc handlerFunc); + static bool call(const std::string &cmd, const std::vector<std::string> &args); + }; +} |