diff options
| author | Markus Mittendrein <git@maxmitti.tk> | 2015-09-09 19:00:56 +0200 |
|---|---|---|
| committer | Markus Mittendrein <git@maxmitti.tk> | 2015-09-09 19:02:23 +0200 |
| commit | 8a6d4b06f2291c363f3dea17837ed20893852453 (patch) | |
| tree | c091375499e35eaa1810586454e0834c06e6c9b2 /CmdFunctionRef.hpp | |
| parent | f554a27046f203e56a07baaf214d90834942e3f5 (diff) | |
| download | manager-8a6d4b06f2291c363f3dea17837ed20893852453.tar.gz manager-8a6d4b06f2291c363f3dea17837ed20893852453.zip | |
Cleanup repo with some directories
Diffstat (limited to 'CmdFunctionRef.hpp')
| -rw-r--r-- | CmdFunctionRef.hpp | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/CmdFunctionRef.hpp b/CmdFunctionRef.hpp deleted file mode 100644 index f862823..0000000 --- a/CmdFunctionRef.hpp +++ /dev/null @@ -1,46 +0,0 @@ -#pragma once - -#include <QString> -#include <QMap> -#include <ClientInfo.hpp> - -class CRSM; - -#define CMD_FUNCTION(name) void name(const QString& cmd, const QString& args, const ClientInfo& client, UserType userType) -#define CMD_FUNCTION_IMPL(name) void CRSM::name(const QString& cmd, const QString& args, const ClientInfo& client, UserType userType) { (void)cmd; (void)args; (void)client; (void)userType; - -enum UserType { - User = 0, - Admin = 1, - Moderator = 2, - Max = Moderator -}; - -typedef void (CRSM::*CmdFunction)(const QString&, const QString&, const ClientInfo&, UserType); - -const QMap<UserType, QString> userTypeStrings { - {User, "Benutzer"}, - {Admin, "Rundenadmin oder Moderator"}, - {Moderator, "Moderator"} -}; - -struct CmdFunctionRef -{ - CmdFunction func = nullptr; - int interfaces = Clonk | IRC; - UserType userType = User; - QString shortDescription = ""; - QString longDescription = ""; - QString name = ""; - QString argList = ""; - - CmdFunctionRef(QString name, CmdFunction func, int interfaces, UserType userType, const QString& shortDescription = "", QString argList = "", const QString &longDescription = "") : func(func), interfaces(interfaces), userType(userType), shortDescription(shortDescription), longDescription(longDescription), name(name), argList(argList) - { - - } - - CmdFunctionRef() - { - - } -}; |
