summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-25 17:43:28 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-25 17:43:28 +0000
commit990c308a959a376335e91014bcaeb0081693947b (patch)
treee05e72d380ae8de1317675af36886c4b451b241f /src/modules/m_spanningtree.cpp
parenta35628400f447873f28117d41ba548dc4d4369b8 (diff)
Whoops, patch
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5324 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree.cpp')
-rw-r--r--src/modules/m_spanningtree.cpp33
1 files changed, 8 insertions, 25 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 2651b4f90..fc5d824de 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -4495,34 +4495,17 @@ class ModuleSpanningTree : public Module
// Only do this for local users
if (IS_LOCAL(user))
{
- char ts[24];
- snprintf(ts,24,"%lu",(unsigned long)channel->age);
-
std::deque<std::string> params;
params.clear();
params.push_back(channel->name);
-
- /** XXX: The client protocol will IGNORE this parameter.
- * We could make use of it if we wanted to keep the TS
- * in step if somehow we lose it.
- */
- params.push_back(ts);
-
- if (channel->GetUserCounter() > 1)
- {
- // not the first in the channel
- DoOneToMany(user->nick,"JOIN",params);
- }
- else
- {
- // first in the channel, set up their permissions
- // and the channel TS with FJOIN.
- params.clear();
- params.push_back(channel->name);
- params.push_back(ts);
- params.push_back("@,"+std::string(user->nick));
- DoOneToMany(ServerInstance->Config->ServerName,"FJOIN",params);
- }
+ // set up their permissions and the channel TS with FJOIN.
+ // All users are FJOINed now, because a module may specify
+ // new joining permissions for the user.
+ params.clear();
+ params.push_back(channel->name);
+ params.push_back(ConvToStr(channel->age));
+ params.push_back(c->GetAllPrefixChars(i->second)+","+std::string(user->nick));
+ DoOneToMany(ServerInstance->Config->ServerName,"FJOIN",params);
}
}