summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-06-13 18:32:29 +0200
committerattilamolnar <attilamolnar@hush.com>2013-06-13 18:32:29 +0200
commit05c816fcb2a8ca0ff97472f756aa28a04084de33 (patch)
treeebab6acdb74c500ab42b91bef776fe539df0f1f2 /src/modules/m_spanningtree
parentac72c53ce2425801e135ab57c5defa707adcef5d (diff)
Rewrite CommandParser::TranslateUIDs()
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/main.cpp4
-rw-r--r--src/modules/m_spanningtree/postcommand.cpp3
-rw-r--r--src/modules/m_spanningtree/protocolinterface.cpp5
3 files changed, 3 insertions, 9 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 8c5439fbb..cc8871abd 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -812,9 +812,7 @@ ModResult ModuleSpanningTree::OnSetAway(User* user, const std::string &awaymsg)
void ModuleSpanningTree::ProtoSendMode(void* opaque, TargetTypeFlags target_type, void* target, const parameterlist &modeline, const std::vector<TranslateType> &translate)
{
TreeSocket* s = (TreeSocket*)opaque;
- std::string output_text;
-
- ServerInstance->Parser->TranslateUIDs(translate, modeline, output_text);
+ std::string output_text = CommandParser::TranslateUIDs(translate, modeline);
if (target)
{
diff --git a/src/modules/m_spanningtree/postcommand.cpp b/src/modules/m_spanningtree/postcommand.cpp
index a2d0c1168..476453e20 100644
--- a/src/modules/m_spanningtree/postcommand.cpp
+++ b/src/modules/m_spanningtree/postcommand.cpp
@@ -75,8 +75,7 @@ void SpanningTreeUtilities::RouteCommand(TreeServer* origin, Command* thiscmd, c
}
}
- std::string output_text;
- ServerInstance->Parser->TranslateUIDs(thiscmd->translation, parameters, output_text, true, thiscmd);
+ std::string output_text = CommandParser::TranslateUIDs(thiscmd->translation, parameters, true, thiscmd);
params.push_back(output_text);
diff --git a/src/modules/m_spanningtree/protocolinterface.cpp b/src/modules/m_spanningtree/protocolinterface.cpp
index ce824fef8..0f5c40cc1 100644
--- a/src/modules/m_spanningtree/protocolinterface.cpp
+++ b/src/modules/m_spanningtree/protocolinterface.cpp
@@ -104,12 +104,9 @@ void SpanningTreeProtocolInterface::SendMode(User* source, User* u, Channel* c,
}
else
{
- std::string output_text;
- ServerInstance->Parser->TranslateUIDs(translate, modedata, output_text);
-
params.push_back(c->name);
params.push_back(ConvToStr(c->age));
- params.push_back(output_text);
+ params.push_back(CommandParser::TranslateUIDs(translate, modedata));
Utils->DoOneToMany(source->uuid, "FMODE", params);
}
}