for(std::string::size_type i = modeline.length(); i > 1; --i) // we use "i > 1" instead of "i" so we skip the +
modechange.push_back(memb->user->nick);
if(modechange.size() >= 3)
- ServerInstance->SendMode(modechange,ServerInstance->FakeClient);
+ ServerInstance->SendGlobalMode(modechange, ServerInstance->FakeClient);
}
}
if (routing.type == ROUTE_TYPE_LOCALONLY)
{
- Module* srcmodule = thiscmd->creator;
- Version ver = srcmodule->GetVersion();
+ /* Broadcast when it's a core command with the default route descriptor and the source is a
+ * remote user or a remote server
+ */
- if ((ver.Flags & VF_CORE) && !IS_LOCAL(user))
- routing = ROUTE_BROADCAST;
- else
- return;
- if (IS_SERVER(user) && user != ServerInstance->FakeClient)
+ Version ver = thiscmd->creator->GetVersion();
+ if ((!(ver.Flags & VF_CORE)) || (IS_LOCAL(user)) || (IS_SERVER(user) == ServerInstance->FakeClient))
return;
+
+ routing = ROUTE_BROADCAST;
}
else if (routing.type == ROUTE_TYPE_OPT_BCAST)
{