summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-06-13 18:41:10 +0200
committerattilamolnar <attilamolnar@hush.com>2013-06-13 18:41:10 +0200
commitc25a59d9036444872d831a126c6326f3d8be5e74 (patch)
treeee29e42bf59f5207890bb97fae37fd2d1ac6771b /src
parent05c816fcb2a8ca0ff97472f756aa28a04084de33 (diff)
Remove TR_END, remove TRANSLATEx() from commands that do not need it
Diffstat (limited to 'src')
-rw-r--r--src/command_parse.cpp1
-rw-r--r--src/commands/cmd_kill.cpp2
-rw-r--r--src/modules/m_alltime.cpp1
-rw-r--r--src/modules/m_callerid.cpp2
-rw-r--r--src/modules/m_cban.cpp1
-rw-r--r--src/modules/m_chghost.cpp2
-rw-r--r--src/modules/m_chgident.cpp2
-rw-r--r--src/modules/m_chgname.cpp2
-rw-r--r--src/modules/m_cycle.cpp1
-rw-r--r--src/modules/m_devoice.cpp1
-rw-r--r--src/modules/m_globalload.cpp1
-rw-r--r--src/modules/m_globops.cpp1
-rw-r--r--src/modules/m_knock.cpp1
-rw-r--r--src/modules/m_nicklock.cpp4
-rw-r--r--src/modules/m_ojoin.cpp1
-rw-r--r--src/modules/m_remove.cpp4
-rw-r--r--src/modules/m_sajoin.cpp2
-rw-r--r--src/modules/m_sakick.cpp2
-rw-r--r--src/modules/m_sanick.cpp2
-rw-r--r--src/modules/m_sapart.cpp2
-rw-r--r--src/modules/m_saquit.cpp2
-rw-r--r--src/modules/m_sethost.cpp1
-rw-r--r--src/modules/m_setident.cpp1
-rw-r--r--src/modules/m_setidle.cpp1
-rw-r--r--src/modules/m_setname.cpp1
-rw-r--r--src/modules/m_silence.cpp3
-rw-r--r--src/modules/m_svshold.cpp1
-rw-r--r--src/modules/m_swhois.cpp2
-rw-r--r--src/modules/m_timedbans.cpp1
-rw-r--r--src/modules/m_uninvite.cpp2
-rw-r--r--src/modules/m_watch.cpp3
31 files changed, 18 insertions, 35 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index 08e28557c..31e61d161 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -435,7 +435,6 @@ void CommandParser::TranslateSingleParam(TranslateType to, const std::string& it
}
// If no custom translator was given, fall through
}
- case TR_END:
case TR_TEXT:
default:
/* Do nothing */
diff --git a/src/commands/cmd_kill.cpp b/src/commands/cmd_kill.cpp
index 74024f84e..dddfe4291 100644
--- a/src/commands/cmd_kill.cpp
+++ b/src/commands/cmd_kill.cpp
@@ -37,7 +37,7 @@ class CommandKill : public Command
CommandKill ( Module* parent) : Command(parent,"KILL",2,2) {
flags_needed = 'o';
syntax = "<nickname> <reason>";
- TRANSLATE3(TR_CUSTOM, TR_CUSTOM, TR_END);
+ TRANSLATE2(TR_CUSTOM, TR_CUSTOM);
}
/** Handle command.
* @param parameters The parameters to the comamnd
diff --git a/src/modules/m_alltime.cpp b/src/modules/m_alltime.cpp
index d0331a994..3e634b056 100644
--- a/src/modules/m_alltime.cpp
+++ b/src/modules/m_alltime.cpp
@@ -29,7 +29,6 @@ class CommandAlltime : public Command
CommandAlltime(Module* Creator) : Command(Creator, "ALLTIME", 0)
{
flags_needed = 'o';
- translation.push_back(TR_END);
}
CmdResult Handle(const std::vector<std::string> &parameters, User *user)
diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp
index 91d417b10..1f9766883 100644
--- a/src/modules/m_callerid.cpp
+++ b/src/modules/m_callerid.cpp
@@ -169,7 +169,7 @@ public:
{
allow_empty_last_param = false;
syntax = "{[+|-]<nicks>}|*}";
- TRANSLATE2(TR_CUSTOM, TR_END);
+ TRANSLATE1(TR_CUSTOM);
}
void EncodeParameter(std::string& parameter, int index)
diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp
index 7dedb7441..b7113eb31 100644
--- a/src/modules/m_cban.cpp
+++ b/src/modules/m_cban.cpp
@@ -88,7 +88,6 @@ class CommandCBan : public Command
CommandCBan(Module* Creator) : Command(Creator, "CBAN", 1, 3)
{
flags_needed = 'o'; this->syntax = "<channel> [<duration> :<reason>]";
- TRANSLATE4(TR_TEXT,TR_TEXT,TR_TEXT,TR_END);
}
CmdResult Handle(const std::vector<std::string> &parameters, User *user)
diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp
index bae83f2da..0d092b9f1 100644
--- a/src/modules/m_chghost.cpp
+++ b/src/modules/m_chghost.cpp
@@ -34,7 +34,7 @@ class CommandChghost : public Command
allow_empty_last_param = false;
flags_needed = 'o';
syntax = "<nick> <newhost>";
- TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
+ TRANSLATE2(TR_NICK, TR_TEXT);
}
CmdResult Handle(const std::vector<std::string> &parameters, User *user)
diff --git a/src/modules/m_chgident.cpp b/src/modules/m_chgident.cpp
index f7777c24e..3ae21c2d2 100644
--- a/src/modules/m_chgident.cpp
+++ b/src/modules/m_chgident.cpp
@@ -34,7 +34,7 @@ class CommandChgident : public Command
allow_empty_last_param = false;
flags_needed = 'o';
syntax = "<nick> <newident>";
- TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
+ TRANSLATE2(TR_NICK, TR_TEXT);
}
CmdResult Handle(const std::vector<std::string> &parameters, User *user)
diff --git a/src/modules/m_chgname.cpp b/src/modules/m_chgname.cpp
index bdeb8a44b..521447842 100644
--- a/src/modules/m_chgname.cpp
+++ b/src/modules/m_chgname.cpp
@@ -32,7 +32,7 @@ class CommandChgname : public Command
allow_empty_last_param = false;
flags_needed = 'o';
syntax = "<nick> <newname>";
- TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
+ TRANSLATE2(TR_NICK, TR_TEXT);
}
CmdResult Handle(const std::vector<std::string> &parameters, User *user)
diff --git a/src/modules/m_cycle.cpp b/src/modules/m_cycle.cpp
index 66d124eb8..68b7399a1 100644
--- a/src/modules/m_cycle.cpp
+++ b/src/modules/m_cycle.cpp
@@ -31,7 +31,6 @@ class CommandCycle : public SplitCommand
: SplitCommand(Creator, "CYCLE", 1)
{
Penalty = 3; syntax = "<channel> :[reason]";
- TRANSLATE3(TR_TEXT, TR_TEXT, TR_END);
}
CmdResult HandleLocal(const std::vector<std::string> &parameters, LocalUser* user)
diff --git a/src/modules/m_devoice.cpp b/src/modules/m_devoice.cpp
index 889658d20..1d203c9fe 100644
--- a/src/modules/m_devoice.cpp
+++ b/src/modules/m_devoice.cpp
@@ -36,7 +36,6 @@ class CommandDevoice : public Command
CommandDevoice(Module* Creator) : Command(Creator,"DEVOICE", 1)
{
syntax = "<channel>";
- TRANSLATE2(TR_TEXT, TR_END);
}
CmdResult Handle (const std::vector<std::string> &parameters, User *user)
diff --git a/src/modules/m_globalload.cpp b/src/modules/m_globalload.cpp
index 7ceb28115..6f696f686 100644
--- a/src/modules/m_globalload.cpp
+++ b/src/modules/m_globalload.cpp
@@ -35,7 +35,6 @@ class CommandGloadmodule : public Command
{
flags_needed = 'o';
syntax = "<modulename> [servermask]";
- TRANSLATE3(TR_TEXT, TR_TEXT, TR_END);
}
CmdResult Handle (const std::vector<std::string> &parameters, User *user)
diff --git a/src/modules/m_globops.cpp b/src/modules/m_globops.cpp
index 53112e39e..8377a255e 100644
--- a/src/modules/m_globops.cpp
+++ b/src/modules/m_globops.cpp
@@ -33,7 +33,6 @@ class CommandGlobops : public Command
CommandGlobops(Module* Creator) : Command(Creator,"GLOBOPS", 1,1)
{
flags_needed = 'o'; syntax = "<any-text>";
- TRANSLATE2(TR_TEXT, TR_END);
}
CmdResult Handle (const std::vector<std::string> &parameters, User *user)
diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp
index 4c29fe6bc..4978f6629 100644
--- a/src/modules/m_knock.cpp
+++ b/src/modules/m_knock.cpp
@@ -34,7 +34,6 @@ class CommandKnock : public Command
{
syntax = "<channel> <reason>";
Penalty = 5;
- TRANSLATE3(TR_TEXT, TR_TEXT, TR_END);
}
CmdResult Handle (const std::vector<std::string> &parameters, User *user)
diff --git a/src/modules/m_nicklock.cpp b/src/modules/m_nicklock.cpp
index 7bd2c43b2..1d14460e6 100644
--- a/src/modules/m_nicklock.cpp
+++ b/src/modules/m_nicklock.cpp
@@ -35,7 +35,7 @@ class CommandNicklock : public Command
{
flags_needed = 'o';
syntax = "<oldnick> <newnick>";
- TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
+ TRANSLATE2(TR_NICK, TR_TEXT);
}
CmdResult Handle(const std::vector<std::string>& parameters, User *user)
@@ -98,7 +98,7 @@ class CommandNickunlock : public Command
{
flags_needed = 'o';
syntax = "<locked-nick>";
- TRANSLATE2(TR_NICK, TR_END);
+ TRANSLATE1(TR_NICK);
}
CmdResult Handle (const std::vector<std::string>& parameters, User *user)
diff --git a/src/modules/m_ojoin.cpp b/src/modules/m_ojoin.cpp
index 4aec2933a..2c0398862 100644
--- a/src/modules/m_ojoin.cpp
+++ b/src/modules/m_ojoin.cpp
@@ -54,7 +54,6 @@ class CommandOjoin : public SplitCommand
{
flags_needed = 'o'; Penalty = 0; syntax = "<channel>";
active = false;
- TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
}
CmdResult HandleLocal(const std::vector<std::string>& parameters, LocalUser* user)
diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp
index d4b7ca42f..ee44e77ff 100644
--- a/src/modules/m_remove.cpp
+++ b/src/modules/m_remove.cpp
@@ -148,7 +148,7 @@ class CommandRemove : public RemoveBase
: RemoveBase(Creator, snk, "REMOVE")
{
syntax = "<nick> <channel> [<reason>]";
- TRANSLATE4(TR_NICK, TR_TEXT, TR_TEXT, TR_END);
+ TRANSLATE3(TR_NICK, TR_TEXT, TR_TEXT);
}
CmdResult Handle (const std::vector<std::string>& parameters, User *user)
@@ -174,7 +174,7 @@ class CommandFpart : public RemoveBase
: RemoveBase(Creator, snk, "FPART")
{
syntax = "<channel> <nick> [<reason>]";
- TRANSLATE4(TR_TEXT, TR_NICK, TR_TEXT, TR_END);
+ TRANSLATE3(TR_TEXT, TR_NICK, TR_TEXT);
}
CmdResult Handle (const std::vector<std::string>& parameters, User *user)
diff --git a/src/modules/m_sajoin.cpp b/src/modules/m_sajoin.cpp
index 205cd6569..dcb79b8e8 100644
--- a/src/modules/m_sajoin.cpp
+++ b/src/modules/m_sajoin.cpp
@@ -32,7 +32,7 @@ class CommandSajoin : public Command
{
allow_empty_last_param = false;
flags_needed = 'o'; Penalty = 0; syntax = "<nick> <channel>";
- TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
+ TRANSLATE2(TR_NICK, TR_TEXT);
}
CmdResult Handle (const std::vector<std::string>& parameters, User *user)
diff --git a/src/modules/m_sakick.cpp b/src/modules/m_sakick.cpp
index 0d36ca8ae..5b92114b5 100644
--- a/src/modules/m_sakick.cpp
+++ b/src/modules/m_sakick.cpp
@@ -30,7 +30,7 @@ class CommandSakick : public Command
CommandSakick(Module* Creator) : Command(Creator,"SAKICK", 2, 3)
{
flags_needed = 'o'; Penalty = 0; syntax = "<channel> <nick> [reason]";
- TRANSLATE4(TR_TEXT, TR_NICK, TR_TEXT, TR_END);
+ TRANSLATE3(TR_TEXT, TR_NICK, TR_TEXT);
}
CmdResult Handle (const std::vector<std::string>& parameters, User *user)
diff --git a/src/modules/m_sanick.cpp b/src/modules/m_sanick.cpp
index 01899dd0a..98b4c1eb9 100644
--- a/src/modules/m_sanick.cpp
+++ b/src/modules/m_sanick.cpp
@@ -32,7 +32,7 @@ class CommandSanick : public Command
{
allow_empty_last_param = false;
flags_needed = 'o'; Penalty = 0; syntax = "<nick> <new-nick>";
- TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
+ TRANSLATE2(TR_NICK, TR_TEXT);
}
CmdResult Handle (const std::vector<std::string>& parameters, User *user)
diff --git a/src/modules/m_sapart.cpp b/src/modules/m_sapart.cpp
index e8cd2b5d1..b23c8757f 100644
--- a/src/modules/m_sapart.cpp
+++ b/src/modules/m_sapart.cpp
@@ -31,7 +31,7 @@ class CommandSapart : public Command
CommandSapart(Module* Creator) : Command(Creator,"SAPART", 2, 3)
{
flags_needed = 'o'; Penalty = 0; syntax = "<nick> <channel> [reason]";
- TRANSLATE4(TR_NICK, TR_TEXT, TR_TEXT, TR_END);
+ TRANSLATE3(TR_NICK, TR_TEXT, TR_TEXT);
}
CmdResult Handle (const std::vector<std::string>& parameters, User *user)
diff --git a/src/modules/m_saquit.cpp b/src/modules/m_saquit.cpp
index b74660487..7a78cada1 100644
--- a/src/modules/m_saquit.cpp
+++ b/src/modules/m_saquit.cpp
@@ -31,7 +31,7 @@ class CommandSaquit : public Command
CommandSaquit(Module* Creator) : Command(Creator, "SAQUIT", 2, 2)
{
flags_needed = 'o'; Penalty = 0; syntax = "<nick> <reason>";
- TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
+ TRANSLATE2(TR_NICK, TR_TEXT);
}
CmdResult Handle (const std::vector<std::string>& parameters, User *user)
diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp
index e3e02fbe8..bc1701049 100644
--- a/src/modules/m_sethost.cpp
+++ b/src/modules/m_sethost.cpp
@@ -34,7 +34,6 @@ class CommandSethost : public Command
{
allow_empty_last_param = false;
flags_needed = 'o'; syntax = "<new-hostname>";
- TRANSLATE2(TR_TEXT, TR_END);
}
CmdResult Handle (const std::vector<std::string>& parameters, User *user)
diff --git a/src/modules/m_setident.cpp b/src/modules/m_setident.cpp
index 2ad886fcd..72878471c 100644
--- a/src/modules/m_setident.cpp
+++ b/src/modules/m_setident.cpp
@@ -33,7 +33,6 @@ class CommandSetident : public Command
{
allow_empty_last_param = false;
flags_needed = 'o'; syntax = "<new-ident>";
- TRANSLATE2(TR_TEXT, TR_END);
}
CmdResult Handle(const std::vector<std::string>& parameters, User *user)
diff --git a/src/modules/m_setidle.cpp b/src/modules/m_setidle.cpp
index 90943f9ef..4cebc2e6f 100644
--- a/src/modules/m_setidle.cpp
+++ b/src/modules/m_setidle.cpp
@@ -31,7 +31,6 @@ class CommandSetidle : public SplitCommand
CommandSetidle(Module* Creator) : SplitCommand(Creator,"SETIDLE", 1)
{
flags_needed = 'o'; syntax = "<duration>";
- TRANSLATE2(TR_TEXT, TR_END);
}
CmdResult HandleLocal(const std::vector<std::string>& parameters, LocalUser* user)
diff --git a/src/modules/m_setname.cpp b/src/modules/m_setname.cpp
index ee42d3852..51ea2fae4 100644
--- a/src/modules/m_setname.cpp
+++ b/src/modules/m_setname.cpp
@@ -32,7 +32,6 @@ class CommandSetname : public Command
{
allow_empty_last_param = false;
syntax = "<new-gecos>";
- TRANSLATE2(TR_TEXT, TR_END);
}
CmdResult Handle (const std::vector<std::string>& parameters, User *user)
diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp
index 0e9a45720..b0ce8f56c 100644
--- a/src/modules/m_silence.cpp
+++ b/src/modules/m_silence.cpp
@@ -66,7 +66,7 @@ class CommandSVSSilence : public Command
CommandSVSSilence(Module* Creator) : Command(Creator,"SVSSILENCE", 2)
{
syntax = "<target> {[+|-]<mask> <p|c|i|n|t|a|x>}";
- TRANSLATE4(TR_NICK, TR_TEXT, TR_TEXT, TR_END); /* we watch for a nick. not a UID. */
+ TRANSLATE3(TR_NICK, TR_TEXT, TR_TEXT);
}
CmdResult Handle (const std::vector<std::string>& parameters, User *user)
@@ -112,7 +112,6 @@ class CommandSilence : public Command
{
allow_empty_last_param = false;
syntax = "{[+|-]<mask> <p|c|i|n|t|a|x>}";
- TRANSLATE3(TR_TEXT, TR_TEXT, TR_END);
}
CmdResult Handle (const std::vector<std::string>& parameters, User *user)
diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp
index a53298126..2815a2c6f 100644
--- a/src/modules/m_svshold.cpp
+++ b/src/modules/m_svshold.cpp
@@ -84,7 +84,6 @@ class CommandSvshold : public Command
CommandSvshold(Module* Creator) : Command(Creator, "SVSHOLD", 1)
{
flags_needed = 'o'; this->syntax = "<nickname> [<duration> :<reason>]";
- TRANSLATE4(TR_TEXT, TR_TEXT, TR_TEXT, TR_END);
}
CmdResult Handle(const std::vector<std::string> &parameters, User *user)
diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp
index a00d60960..9e461e627 100644
--- a/src/modules/m_swhois.cpp
+++ b/src/modules/m_swhois.cpp
@@ -36,7 +36,7 @@ class CommandSwhois : public Command
CommandSwhois(Module* Creator) : Command(Creator,"SWHOIS", 2,2), swhois("swhois", Creator)
{
flags_needed = 'o'; syntax = "<nick> :<swhois>";
- TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
+ TRANSLATE2(TR_NICK, TR_TEXT);
}
CmdResult Handle(const std::vector<std::string> &parameters, User* user)
diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp
index 93245432d..3602469bd 100644
--- a/src/modules/m_timedbans.cpp
+++ b/src/modules/m_timedbans.cpp
@@ -45,7 +45,6 @@ class CommandTban : public Command
CommandTban(Module* Creator) : Command(Creator,"TBAN", 3)
{
syntax = "<channel> <duration> <banmask>";
- TRANSLATE4(TR_TEXT, TR_TEXT, TR_TEXT, TR_END);
}
CmdResult Handle (const std::vector<std::string> &parameters, User *user)
diff --git a/src/modules/m_uninvite.cpp b/src/modules/m_uninvite.cpp
index 79a0d8eec..736211da3 100644
--- a/src/modules/m_uninvite.cpp
+++ b/src/modules/m_uninvite.cpp
@@ -32,7 +32,7 @@ class CommandUninvite : public Command
CommandUninvite(Module* Creator) : Command(Creator,"UNINVITE", 2)
{
syntax = "<nick> <channel>";
- TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
+ TRANSLATE2(TR_NICK, TR_TEXT);
}
CmdResult Handle (const std::vector<std::string> &parameters, User *user)
diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp
index 712699775..c1a24974b 100644
--- a/src/modules/m_watch.cpp
+++ b/src/modules/m_watch.cpp
@@ -107,7 +107,7 @@ class CommandSVSWatch : public Command
CommandSVSWatch(Module* Creator) : Command(Creator,"SVSWATCH", 2)
{
syntax = "<target> [C|L|S]|[+|-<nick>]";
- TRANSLATE3(TR_NICK, TR_TEXT, TR_END); /* we watch for a nick. not a UID. */
+ TRANSLATE2(TR_NICK, TR_TEXT); /* we watch for a nick. not a UID. */
}
CmdResult Handle (const std::vector<std::string> &parameters, User *user)
@@ -255,7 +255,6 @@ class CommandWatch : public Command
CommandWatch(Module* parent, unsigned int &maxwatch) : Command(parent,"WATCH", 0), MAX_WATCH(maxwatch), ext("watchlist", parent)
{
syntax = "[C|L|S]|[+|-<nick>]";
- TRANSLATE2(TR_TEXT, TR_END); /* we watch for a nick. not a UID. */
}
CmdResult Handle (const std::vector<std::string> &parameters, User *user)