diff options
| author | 2010-02-09 12:43:13 -0600 | |
|---|---|---|
| committer | 2010-08-03 17:32:34 -0400 | |
| commit | d439bfcb17ccaf3d8e9366ce8d3922d3b83326b9 (patch) | |
| tree | 4d7341ebe0413e8f741d4ab11f0a1d592aa324a7 /src/modules/m_spanningtree/main.cpp | |
| parent | Update InspIRCd::SendMode to take a modestacker (diff) | |
Fixups for s2s sync (currently limited to lettered modes)
Diffstat (limited to 'src/modules/m_spanningtree/main.cpp')
| -rw-r--r-- | src/modules/m_spanningtree/main.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 68367cee0..c6ea6781e 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -850,21 +850,20 @@ void ModuleSpanningTree::OnDelLine(User* user, XLine *x) } } -void ModuleSpanningTree::OnMode(User* user, void* dest, int target_type, const parameterlist &text, const std::vector<TranslateType> &translate) +void ModuleSpanningTree::OnMode(User* user, Extensible* dest, const irc::modestacker& modesc) { + irc::modestacker modes(modesc); if ((IS_LOCAL(user)) && (user->registered == REG_ALL)) { parameterlist params; + int id; std::string command; - std::string output_text; - ServerInstance->Parser->TranslateUIDs(translate, text, output_text); - - if (target_type == TYPE_USER) + User* u = dynamic_cast<User*>(dest); + if (u) { - User* u = (User*)dest; params.push_back(u->uuid); - params.push_back(output_text); + id = 1; command = "MODE"; } else @@ -872,11 +871,16 @@ void ModuleSpanningTree::OnMode(User* user, void* dest, int target_type, const p Channel* c = (Channel*)dest; params.push_back(c->name); params.push_back(ConvToStr(c->age)); - params.push_back(output_text); + id = 2; command = "FMODE"; } + params.push_back(""); - Utils->DoOneToMany(user->uuid, command, params); + while (!modes.empty()) + { + params[id] = modes.popModeLine(true); + Utils->DoOneToMany(user->uuid, command, params); + } } } |
