summaryrefslogtreecommitdiff
path: root/src/modules.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-03-06 22:28:57 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-03-06 22:28:57 +0000
commit526f5a4a02882b19056fe755dff1f64b764ff313 (patch)
tree6a9e92e4f3f7088b18dcdde360d07c911ee174df /src/modules.cpp
parenteacd707421be4f2612df9bde4517649061bb062e (diff)
Construct explicit parameter type list for MODE parameters
Previously, we used TR_SPACENICKLIST on the parameters. This worked only because usually, if anything in the list parsed as a nick, then it was a nick. However, some modes like +k and +g allow free-form text, which could also resolve as a nick. Add extra parameters to allow modes to specify their TranslateType, defaulting to TR_TEXT. This fixes bug #757, found by Taros git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11180 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index db14fd1e6..2d8c9387f 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -116,7 +116,7 @@ void Module::OnPostJoin(User*, Channel*) { }
void Module::OnUserPart(User*, Channel*, std::string&, bool&) { }
void Module::OnRehash(User*, const std::string&) { }
int Module::OnUserPreJoin(User*, Channel*, const char*, std::string&, const std::string&) { return 0; }
-void Module::OnMode(User*, void*, int, const std::string&) { }
+void Module::OnMode(User*, void*, int, const std::string&, const std::vector<TranslateType>&) { }
Version Module::GetVersion() { return Version("Misconfigured", VF_VENDOR, -1); }
void Module::OnOper(User*, const std::string&) { }
void Module::OnPostOper(User*, const std::string&, const std::string &) { }
@@ -170,7 +170,7 @@ void Module::OnPostLocalTopicChange(User*, Channel*, const std::string&) { }
void Module::OnGetServerDescription(const std::string&, std::string&) { }
void Module::OnSyncUser(User*, Module*, void*) { }
void Module::OnSyncChannel(Channel*, Module*, void*) { }
-void Module::ProtoSendMode(void*, TargetTypeFlags, void*, const std::string&) { }
+void Module::ProtoSendMode(void*, TargetTypeFlags, void*, const std::string&, const std::vector<TranslateType>&) { }
void Module::OnSyncChannelMetaData(Channel*, Module*, void*, const std::string&, bool) { }
void Module::OnSyncUserMetaData(User*, Module*, void*, const std::string&, bool) { }
void Module::OnSyncOtherMetaData(Module*, void*, bool) { }