summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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())