diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-27 15:35:14 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-27 15:35:14 +0000 |
commit | 853f4d66cad6018f7c8230fc1ea0f54abe7acc8a (patch) | |
tree | 3dda7ac295d0acd4dd5261a8a7fd7c11194dd2eb | |
parent | 036f62f864411dd5018ec718ec58a9c787cbbcfd (diff) |
Some useful defines for tidy definition of translation lists. See constructor of cmd_cban in m_cban.cpp
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7890 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | include/ctables.h | 13 | ||||
-rw-r--r-- | src/modules/m_alltime.cpp | 1 | ||||
-rw-r--r-- | src/modules/m_cban.cpp | 1 |
3 files changed, 15 insertions, 0 deletions
diff --git a/include/ctables.h b/include/ctables.h index a1f05a3a8..105b439a3 100644 --- a/include/ctables.h +++ b/include/ctables.h @@ -180,5 +180,18 @@ class CoreExport command_t : public Extensible */ typedef nspace::hash_map<std::string,command_t*> command_table; +#define TRANSLATE1(x1) translation.push_back(x1); +#define TRANSLATE2(x1,x2) translation.push_back(x1);translation.push_back(x2); +#define TRANSLATE3(x1,x2,x3) translation.push_back(x1);translation.push_back(x2);translation.push_back(x3); +#define TRANSLATE4(x1,x2,x3,x4) translation.push_back(x1);translation.push_back(x2);translation.push_back(x3);translation.push_back(x4); +#define TRANSLATE5(x1,x2,x3,x4,x5) translation.push_back(x1);translation.push_back(x2);translation.push_back(x3);translation.push_back(x4);\ + translation.push_back(x5); +#define TRANSLATE6(x1,x2,x3,x4,x5,x6) translation.push_back(x1);translation.push_back(x2);translation.push_back(x3);translation.push_back(x4);\ + translation.push_back(x5);translation.push_back(x6); +#define TRANSLATE7(x1,x2,x3,x4,x5,x6,x7) translation.push_back(x1);translation.push_back(x2);translation.push_back(x3);translation.push_back(x4);\ + translation.push_back(x5);translation.push_back(x6);translation.push_back(x7); +#define TRANSLATE8(x1,x2,x3,x4,x5,x6,x7,x8) translation.push_back(x1);translation.push_back(x2);translation.push_back(x3);translation.push_back(x4);\ + translation.push_back(x5);translation.push_back(x6);translation.push_back(x7);translation.push_back(x8); + #endif diff --git a/src/modules/m_alltime.cpp b/src/modules/m_alltime.cpp index 70773167b..37dbf38a0 100644 --- a/src/modules/m_alltime.cpp +++ b/src/modules/m_alltime.cpp @@ -22,6 +22,7 @@ class cmd_alltime : public command_t { this->source = "m_alltime.so"; syntax.clear(); + translation.push_back(TR_END); } CmdResult Handle(const char **parameters, int pcnt, userrec *user) diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp index abb4cd12a..7c88b03da 100644 --- a/src/modules/m_cban.cpp +++ b/src/modules/m_cban.cpp @@ -51,6 +51,7 @@ class cmd_cban : public command_t { this->source = "m_cban.so"; this->syntax = "<channel> [<duration> :<reason>]"; + TRANSLATE4(TR_TEXT,TR_TEXT,TR_TEXT,TR_END); } CmdResult Handle(const char** parameters, int pcnt, userrec *user) |