diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-27 16:05:59 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-27 16:05:59 +0000 |
commit | 2b3394855d5adddb16285b905503d9ffe5a1d963 (patch) | |
tree | 5a253a4b3d9420758a510f15c0332d29410fff7a /src | |
parent | 9bea99f973d8ff1148172ab3b4aa93e895bbc37e (diff) |
Add a metric assload of TRANSLATE macros to modules.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7892 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
28 files changed, 58 insertions, 0 deletions
diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp index a30e70099..5f5623682 100644 --- a/src/modules/m_chghost.cpp +++ b/src/modules/m_chghost.cpp @@ -26,6 +26,7 @@ class cmd_chghost : public command_t { this->source = "m_chghost.so"; syntax = "<nick> <newhost>"; + TRANSLATE3(TR_NICK, TR_TEXT, TR_END); } CmdResult Handle(const char** parameters, int pcnt, userrec *user) diff --git a/src/modules/m_chgident.cpp b/src/modules/m_chgident.cpp index 50e1d466f..ee6f6e531 100644 --- a/src/modules/m_chgident.cpp +++ b/src/modules/m_chgident.cpp @@ -24,6 +24,7 @@ class cmd_chgident : public command_t { this->source = "m_chgident.so"; syntax = "<nick> <newident>"; + TRANSLATE3(TR_NICK, TR_TEXT, TR_END); } CmdResult Handle(const char** parameters, int pcnt, userrec *user) diff --git a/src/modules/m_chgname.cpp b/src/modules/m_chgname.cpp index 615239dcc..ddb38567f 100644 --- a/src/modules/m_chgname.cpp +++ b/src/modules/m_chgname.cpp @@ -24,6 +24,7 @@ class cmd_chgname : public command_t { this->source = "m_chgname.so"; syntax = "<nick> <newname>"; + TRANSLATE3(TR_NICK, TR_TEXT, TR_END); } CmdResult Handle(const char** parameters, int pcnt, userrec *user) diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp index e2125644e..df142a089 100644 --- a/src/modules/m_customtitle.cpp +++ b/src/modules/m_customtitle.cpp @@ -26,6 +26,7 @@ class cmd_title : public command_t { this->source = "m_customtitle.so"; syntax = "<user> <password>"; + TRANSLATE3(TR_NICK, TR_TEXT, TR_END); } bool OneOfMatches(const char* host, const char* ip, const char* hostlist) diff --git a/src/modules/m_cycle.cpp b/src/modules/m_cycle.cpp index c9a08c12a..295e73208 100644 --- a/src/modules/m_cycle.cpp +++ b/src/modules/m_cycle.cpp @@ -24,6 +24,7 @@ class cmd_cycle : public command_t { this->source = "m_cycle.so"; syntax = "<channel> :[reason]"; + TRANSLATE3(TR_TEXT, TR_TEXT, TR_END); } CmdResult Handle (const char** parameters, int pcnt, userrec *user) diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index 5e3f286b5..fd51e4d61 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -51,6 +51,7 @@ class cmd_dccallow : public command_t { this->source = "m_dccallow.so"; syntax = "{[+|-]<nick> <time>|HELP|LIST}"; + /* XXX we need to fix this so it can work with translation stuff (i.e. move +- into a seperate param */ } CmdResult Handle(const char **parameters, int pcnt, userrec *user) diff --git a/src/modules/m_devoice.cpp b/src/modules/m_devoice.cpp index 8169ea277..64c341ad6 100644 --- a/src/modules/m_devoice.cpp +++ b/src/modules/m_devoice.cpp @@ -29,6 +29,7 @@ class cmd_devoice : public command_t { this->source = "m_devoice.so"; syntax = "<channel>"; + TRANSLATE2(TR_TEXT, TR_END); } CmdResult Handle (const char** parameters, int pcnt, userrec *user) diff --git a/src/modules/m_globalload.cpp b/src/modules/m_globalload.cpp index 18e8ab018..d0ace07df 100644 --- a/src/modules/m_globalload.cpp +++ b/src/modules/m_globalload.cpp @@ -24,6 +24,7 @@ class cmd_gloadmodule : public command_t { this->source = "m_globalload.so"; syntax = "<modulename> [servermask]"; + TRANSLATE3(TR_TEXT, TR_TEXT, TR_END); } CmdResult Handle (const char** parameters, int pcnt, userrec *user) diff --git a/src/modules/m_globops.cpp b/src/modules/m_globops.cpp index efe50731d..9908ad053 100644 --- a/src/modules/m_globops.cpp +++ b/src/modules/m_globops.cpp @@ -26,6 +26,7 @@ class cmd_globops : public command_t { this->source = "m_globops.so"; syntax = "<any-text>"; + TRANSLATE2(TR_TEXT, TR_END); } CmdResult Handle (const char** parameters, int pcnt, userrec *user) diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp index 23ee05395..3f9608935 100644 --- a/src/modules/m_knock.cpp +++ b/src/modules/m_knock.cpp @@ -24,6 +24,7 @@ class cmd_knock : public command_t { this->source = "m_knock.so"; syntax = "<channel> <reason>"; + TRANSLATE3(TR_TEXT, TR_TEXT, TR_END); } CmdResult Handle (const char** parameters, int pcnt, userrec *user) diff --git a/src/modules/m_nicklock.cpp b/src/modules/m_nicklock.cpp index 924c02995..357a3f9b1 100644 --- a/src/modules/m_nicklock.cpp +++ b/src/modules/m_nicklock.cpp @@ -25,6 +25,7 @@ class cmd_nicklock : public command_t { this->source = "m_nicklock.so"; syntax = "<oldnick> <newnick>"; + TRANSLATE3(TR_NICK, TR_TEXT, TR_END); } CmdResult Handle(const char** parameters, int pcnt, userrec *user) diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp index 600a75d3d..feb2afa85 100644 --- a/src/modules/m_remove.cpp +++ b/src/modules/m_remove.cpp @@ -210,6 +210,7 @@ class cmd_remove : public command_t, public RemoveBase { this->source = "m_remove.so"; syntax = "<nick> <channel> [<reason>]"; + TRANSLATE4(TR_NICK, TR_TEXT, TR_TEXT, TR_END); } CmdResult Handle (const char** parameters, int pcnt, userrec *user) diff --git a/src/modules/m_sajoin.cpp b/src/modules/m_sajoin.cpp index 32d136d6b..b99f6f65d 100644 --- a/src/modules/m_sajoin.cpp +++ b/src/modules/m_sajoin.cpp @@ -24,6 +24,7 @@ class cmd_sajoin : public command_t { this->source = "m_sajoin.so"; syntax = "<nick> <channel>"; + TRANSLATE3(TR_NICK, TR_TEXT, TR_END); } CmdResult Handle (const char** parameters, int pcnt, userrec *user) diff --git a/src/modules/m_sanick.cpp b/src/modules/m_sanick.cpp index 292644ee9..de70579f9 100644 --- a/src/modules/m_sanick.cpp +++ b/src/modules/m_sanick.cpp @@ -24,6 +24,7 @@ class cmd_sanick : public command_t { this->source = "m_sanick.so"; syntax = "<nick> <new-nick>"; + TRANSLATE3(TR_NICK, TR_TEXT, TR_END); } CmdResult Handle (const char** parameters, int pcnt, userrec *user) diff --git a/src/modules/m_sapart.cpp b/src/modules/m_sapart.cpp index e90a1de11..32cd751b0 100644 --- a/src/modules/m_sapart.cpp +++ b/src/modules/m_sapart.cpp @@ -24,6 +24,7 @@ class cmd_sapart : public command_t { this->source = "m_sapart.so"; syntax = "<nick> <channel>"; + TRANSLATE3(TR_NICK, TR_TEXT, TR_END); } CmdResult Handle (const char** parameters, int pcnt, userrec *user) diff --git a/src/modules/m_saquit.cpp b/src/modules/m_saquit.cpp index 26d1be5ec..11efd8629 100644 --- a/src/modules/m_saquit.cpp +++ b/src/modules/m_saquit.cpp @@ -24,6 +24,7 @@ class cmd_saquit : public command_t { this->source = "m_saquit.so"; syntax = "<nick> <reason>"; + TRANSLATE3(TR_NICK, TR_TEXT, TR_END); } CmdResult Handle (const char** parameters, int pcnt, userrec *user) diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp index 4f0344846..730909d6c 100644 --- a/src/modules/m_sethost.cpp +++ b/src/modules/m_sethost.cpp @@ -26,6 +26,7 @@ class cmd_sethost : public command_t { this->source = "m_sethost.so"; syntax = "<new-hostname>"; + TRANSLATE2(TR_TEXT, TR_END); } CmdResult Handle (const char** parameters, int pcnt, userrec *user) diff --git a/src/modules/m_setident.cpp b/src/modules/m_setident.cpp index 1914a2307..a353f883c 100644 --- a/src/modules/m_setident.cpp +++ b/src/modules/m_setident.cpp @@ -24,6 +24,7 @@ class cmd_setident : public command_t { this->source = "m_setident.so"; syntax = "<new-ident>"; + TRANSLATE2(TR_TEXT, TR_END); } CmdResult Handle(const char** parameters, int pcnt, userrec *user) diff --git a/src/modules/m_setidle.cpp b/src/modules/m_setidle.cpp index f5f669d5d..d95a9bfc1 100644 --- a/src/modules/m_setidle.cpp +++ b/src/modules/m_setidle.cpp @@ -24,6 +24,7 @@ class cmd_setidle : public command_t { this->source = "m_setidle.so"; syntax = "<duration>"; + TRANSLATE2(TR_TEXT, TR_END); } CmdResult Handle (const char** parameters, int pcnt, userrec *user) diff --git a/src/modules/m_setname.cpp b/src/modules/m_setname.cpp index da04b9e72..fb439db6f 100644 --- a/src/modules/m_setname.cpp +++ b/src/modules/m_setname.cpp @@ -24,6 +24,7 @@ class cmd_setname : public command_t { this->source = "m_setname.so"; syntax = "<new-gecos>"; + TRANSLATE2(TR_TEXT, TR_END); } CmdResult Handle (const char** parameters, int pcnt, userrec *user) diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp index 4c14b8c7b..f809d7d57 100644 --- a/src/modules/m_silence.cpp +++ b/src/modules/m_silence.cpp @@ -29,6 +29,7 @@ class cmd_silence : public command_t { this->source = "m_silence.so"; syntax = "{[+|-]<mask>}"; + TRANSLATE2(TR_TEXT, TR_END); } CmdResult Handle (const char** parameters, int pcnt, userrec *user) diff --git a/src/modules/m_silence_ext.cpp b/src/modules/m_silence_ext.cpp index e6ca551ac..3c1dcec27 100644 --- a/src/modules/m_silence_ext.cpp +++ b/src/modules/m_silence_ext.cpp @@ -59,6 +59,7 @@ class cmd_silence : public command_t { this->source = "m_silence_ext.so"; syntax = "{[+|-]<mask> <p|c|i|n|t|a|x>}"; + TRANSLATE3(TR_TEXT, TR_TEXT, TR_END); } CmdResult Handle (const char** parameters, int pcnt, userrec *user) diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index 21882eda8..c75bf17e9 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -966,6 +966,37 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque<std::string> &pa if (iter != this->Instance->clientlist->end()) { /* + * Nick collision. + * Under old protocol rules, we would have had to kill both clients. + * Really, this sucks. + * These days, we have UID. And, so what we do is, force nick change client(s) + * involved according to timestamp rules. + * + * RULES: + * user@host equal: + * Force nick change on OLDER timestamped client + * user@host differ: + * Force nick change on NEWER timestamped client + * TS EQUAL: + * FNC both. + * + * Note that remote clients MUST be dealt with also to remove desyncs. + * XXX we don't do this yet. + * + * This stops abusive use of collisions, simplifies problems with loops, and so on. + * -- w00t + */ + + if (age == iter->second->signon) + { + /* TS equal, do both */ + + } + else + { + } + + /* * Uh oh, nick collision. Under old rules, we'd kill both. These days now we have UUID, * we force both clients to change nick to their UUID. Just change ours, and the other * server will change theirs when they see the collide. Problem solved! -- w00t diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp index a18c5d5b1..4027dbeb7 100644 --- a/src/modules/m_svshold.cpp +++ b/src/modules/m_svshold.cpp @@ -54,6 +54,7 @@ class cmd_svshold : public command_t { this->source = "m_svshold.so"; this->syntax = "<nickname> [<duration> :<reason>]"; + TRANSLATE4(TR_NICK, TR_TEXT, TR_TEXT, TR_END); } CmdResult Handle(const char** parameters, int pcnt, userrec *user) diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp index f5d5ee461..09d9d94af 100644 --- a/src/modules/m_swhois.cpp +++ b/src/modules/m_swhois.cpp @@ -25,6 +25,7 @@ class cmd_swhois : public command_t { this->source = "m_swhois.so"; syntax = "<nick> <swhois>"; + TRANSLATE3(TR_NICK, TR_TEXT, TR_END); } CmdResult Handle(const char** parameters, int pcnt, userrec* user) diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp index d223ddae6..40f740922 100644 --- a/src/modules/m_timedbans.cpp +++ b/src/modules/m_timedbans.cpp @@ -37,6 +37,7 @@ class cmd_tban : public command_t { this->source = "m_timedbans.so"; syntax = "<channel> <duration> <banmask>"; + TRANSLATE4(TR_TEXT, TR_TEXT, TR_TEXT, TR_END); } CmdResult Handle (const char** parameters, int pcnt, userrec *user) diff --git a/src/modules/m_uninvite.cpp b/src/modules/m_uninvite.cpp index 03ef5be71..cd3296ce6 100644 --- a/src/modules/m_uninvite.cpp +++ b/src/modules/m_uninvite.cpp @@ -24,6 +24,7 @@ class cmd_uninvite : public command_t { this->source = "m_uninvite.so"; syntax = "<nick> <channel>"; + TRANSLATE3(TR_NICK, TR_TEXT, TR_END); } CmdResult Handle (const char** parameters, int pcnt, userrec *user) diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp index 9b68b976f..12dda102b 100644 --- a/src/modules/m_watch.cpp +++ b/src/modules/m_watch.cpp @@ -196,6 +196,7 @@ class cmd_watch : public command_t { this->source = "m_watch.so"; syntax = "[C|L|S]|[+|-<nick>]"; + TRANSLATE2(TR_TEXT, TR_END); /* we watch for a nick. not a UID. */ } CmdResult Handle (const char** parameters, int pcnt, userrec *user) |