summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/svsjoin.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/svsjoin.cpp b/src/modules/m_spanningtree/svsjoin.cpp
index 552e08dd3..98443409a 100644
--- a/src/modules/m_spanningtree/svsjoin.cpp
+++ b/src/modules/m_spanningtree/svsjoin.cpp
@@ -36,7 +36,19 @@ CmdResult CommandSVSJoin::Handle(User* user, std::vector<std::string>& parameter
/* only join if it's local, otherwise just pass it on! */
LocalUser* localuser = IS_LOCAL(u);
if (localuser)
- Channel::JoinUser(localuser, parameters[1]);
+ {
+ bool override = false;
+ std::string key;
+ if (parameters.size() >= 3)
+ {
+ key = parameters[2];
+ if (key.empty())
+ override = true;
+ }
+
+ Channel::JoinUser(localuser, parameters[1], override, key);
+ }
+
return CMD_SUCCESS;
}