summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-04-12 16:00:17 +0200
committerattilamolnar <attilamolnar@hush.com>2013-04-13 16:05:54 +0200
commitb98acac5c91ecb08da28d70185818a19991eb1db (patch)
treea72446ebf241ced2b21939eb8adb7a0045274dfe /src/modules/m_spanningtree
parent988d8218071b504521bd1da6c2275db877d857b9 (diff)
Channel::JoinUser() and Channel::ForceChan() changes
Convert static Channel::ForceChan() to non-static Channel::ForceJoin() that joins a user to a channel, no permission checks The (static) Channel::JoinUser() now has a LocalUser parameter, and no longer have TS and bursting parameters. If the channel doesn't exist, it is created using current time as TS
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/fjoin.cpp2
-rw-r--r--src/modules/m_spanningtree/svsjoin.cpp5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/m_spanningtree/fjoin.cpp b/src/modules/m_spanningtree/fjoin.cpp
index be13f5318..5e58a164f 100644
--- a/src/modules/m_spanningtree/fjoin.cpp
+++ b/src/modules/m_spanningtree/fjoin.cpp
@@ -192,7 +192,7 @@ bool CommandFJoin::ProcessModeUUIDPair(const std::string& item, TreeSocket* src_
}
}
- Channel::JoinUser(who, chan->name, true, "", route_back_again->bursting, chan->age);
+ chan->ForceJoin(who, NULL, route_back_again->bursting);
return true;
}
diff --git a/src/modules/m_spanningtree/svsjoin.cpp b/src/modules/m_spanningtree/svsjoin.cpp
index a1796740d..6b1d2835c 100644
--- a/src/modules/m_spanningtree/svsjoin.cpp
+++ b/src/modules/m_spanningtree/svsjoin.cpp
@@ -34,8 +34,9 @@ CmdResult CommandSVSJoin::Handle(const std::vector<std::string>& parameters, Use
return CMD_FAILURE;
/* only join if it's local, otherwise just pass it on! */
- if (IS_LOCAL(u))
- Channel::JoinUser(u, parameters[1], false, "", false, ServerInstance->Time());
+ LocalUser* localuser = IS_LOCAL(u);
+ if (localuser)
+ Channel::JoinUser(localuser, parameters[1]);
return CMD_SUCCESS;
}