summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-17 00:43:20 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-17 00:43:20 +0000
commit8826f2b0ec596f3394ce636651d4f08437b10f3c (patch)
tree8f81dd68098f5eb517a313853fa67772402771b2 /src/modules
parent5d9609ea474dc577824dd921288dee83a4f01077 (diff)
Fix routing of prefix-channel messages now that 2.0 sends to status and above, not just status
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12483 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_spanningtree/main.cpp3
-rw-r--r--src/modules/m_spanningtree/utils.cpp10
2 files changed, 11 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index b313b876a..b9e36ba25 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -31,6 +31,7 @@ ModuleSpanningTree::ModuleSpanningTree()
{
Utils = new SpanningTreeUtilities(this);
commands = new SpanningTreeCommands(this);
+ RefreshTimer = NULL;
}
SpanningTreeCommands::SpanningTreeCommands(ModuleSpanningTree* module)
@@ -43,7 +44,6 @@ SpanningTreeCommands::SpanningTreeCommands(ModuleSpanningTree* module)
void ModuleSpanningTree::init()
{
- RefreshTimer = new CacheRefreshTimer(Utils);
ServerInstance->Modules->AddService(commands->rconnect);
ServerInstance->Modules->AddService(commands->rsquit);
ServerInstance->Modules->AddService(commands->svsjoin);
@@ -58,6 +58,7 @@ void ModuleSpanningTree::init()
ServerInstance->Modules->AddService(commands->fhost);
ServerInstance->Modules->AddService(commands->fident);
ServerInstance->Modules->AddService(commands->fname);
+ RefreshTimer = new CacheRefreshTimer(Utils);
ServerInstance->Timers->AddTimer(RefreshTimer);
Implementation eventlist[] =
diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp
index e0f2ff601..81fb0ecde 100644
--- a/src/modules/m_spanningtree/utils.cpp
+++ b/src/modules/m_spanningtree/utils.cpp
@@ -171,6 +171,14 @@ void SpanningTreeUtilities::AddThisServer(TreeServer* server, TreeServerList &li
/* returns a list of DIRECT servernames for a specific channel */
void SpanningTreeUtilities::GetListOfServersForChannel(Channel* c, TreeServerList &list, char status, const CUList &exempt_list)
{
+ unsigned int minrank = 0;
+ if (status)
+ {
+ ModeHandler* mh = ServerInstance->Modes->FindPrefix(status);
+ if (mh)
+ minrank = mh->GetPrefixRank();
+ }
+
const UserMembList *ulist = c->GetUsers();
for (UserMembCIter i = ulist->begin(); i != ulist->end(); i++)
@@ -178,7 +186,7 @@ void SpanningTreeUtilities::GetListOfServersForChannel(Channel* c, TreeServerLis
if (IS_LOCAL(i->first))
continue;
- if (status && !strchr(c->GetAllPrefixChars(i->first), status))
+ if (minrank && i->second->getRank() < minrank)
continue;
if (exempt_list.find(i->first) == exempt_list.end())