diff options
42 files changed, 88 insertions, 92 deletions
diff --git a/include/numerics.h b/include/numerics.h index 8d07259d6..de6b92325 100644 --- a/include/numerics.h +++ b/include/numerics.h @@ -154,7 +154,7 @@ enum ERR_BANLISTFULL = 478, ERR_NOPRIVILEGES = 481, // rfc, beware though, we use this for other things opers may not do also - ERR_CHANOPRIVSNEEDED = 482, // rfc, beware though, we use this for other things like trying to kick a uline + ERR_CHANOPRIVSNEEDED = 482, ERR_RESTRICTED = 484, diff --git a/include/server.h b/include/server.h index 107ad69e9..cf9637765 100644 --- a/include/server.h +++ b/include/server.h @@ -36,13 +36,11 @@ class CoreExport Server : public classbase */ std::string description; - /** True if this server is ulined - */ - bool uline = false; + /** True if this server is a service. */ + bool service = false; - /** True if this server is a silent uline, i.e. silent="yes" in the uline block - */ - bool silentuline = false; + /** True if this server is a silent service, i.e. silent="yes" in the service block. */ + bool silentservice = false; /** Allow ConfigReaderThread to update the description on a rehash */ @@ -71,15 +69,15 @@ class CoreExport Server : public classbase const std::string& GetDesc() const { return description; } /** - * Checks whether this server is ulined - * @return True if this server is ulined, false otherwise. + * Checks whether this server is a service. + * @return True if this server is a service, false otherwise. */ - bool IsULine() const { return uline; } + bool IsService() const { return service; } /** - * Checks whether this server is a silent uline - * Silent uline servers introduce, quit and oper up users without a snotice being generated. - * @return True if this server is a silent uline, false otherwise. + * Checks whether this server is a silent service. + * Silent services servers introduce, quit and oper up users without a snotice being generated. + * @return True if this server is a silent service, false otherwise. */ - bool IsSilentULine() const { return silentuline; } + bool IsSilentService() const { return silentservice; } }; diff --git a/include/usermanager.h b/include/usermanager.h index 48990e05e..acbf3ca1f 100644 --- a/include/usermanager.h +++ b/include/usermanager.h @@ -46,7 +46,7 @@ class CoreExport UserManager typedef std::vector<User*> OperList; /** A list containing users who are on a U-lined servers. */ - typedef std::vector<User*> ULineList; + typedef std::vector<User*> ServiceList; /** A list holding local users */ @@ -91,8 +91,8 @@ class CoreExport UserManager */ OperList all_opers; - /** A list of users on U-lined servers. */ - ULineList all_ulines; + /** A list of users on services servers. */ + ServiceList all_services; /** Number of unregistered users online right now. * (Unregistered means before USER/NICK/dns) @@ -164,10 +164,10 @@ class CoreExport UserManager */ unsigned int UnregisteredUserCount() const { return this->unregistered_count; } - /** Return a count of users on a u-lined servers. - * @return The number of users on u-lined servers. + /** Return a count of users on a services servers. + * @return The number of users on services servers. */ - unsigned int ULineCount() const { return this->all_ulines.size(); } + unsigned int ULineCount() const { return this->all_services.size(); } /** Return a count of local registered users * @return The number of registered local users diff --git a/src/coremods/core_channel/cmd_kick.cpp b/src/coremods/core_channel/cmd_kick.cpp index 2b8bd2dfe..4139887df 100644 --- a/src/coremods/core_channel/cmd_kick.cpp +++ b/src/coremods/core_channel/cmd_kick.cpp @@ -71,7 +71,7 @@ CmdResult CommandKick::Handle(User* user, const Params& parameters) return CmdResult::FAILURE; } - if (u->server->IsULine()) + if (u->server->IsService()) { user->WriteNumeric(ERR_CHANOPRIVSNEEDED, c->name, "You may not kick a U-lined client"); return CmdResult::FAILURE; diff --git a/src/coremods/core_info/cmd_servlist.cpp b/src/coremods/core_info/cmd_servlist.cpp index 8c71e2521..36a486986 100644 --- a/src/coremods/core_info/cmd_servlist.cpp +++ b/src/coremods/core_info/cmd_servlist.cpp @@ -38,20 +38,19 @@ CommandServList::CommandServList(Module* parent) CmdResult CommandServList::HandleLocal(LocalUser* user, const Params& parameters) { const std::string& mask = parameters.empty() ? "*" : parameters[0]; - for (UserManager::ULineList::const_iterator iter = ServerInstance->Users.all_ulines.begin(); iter != ServerInstance->Users.all_ulines.end(); ++iter) + for (auto* service : ServerInstance->Users.all_services) { - User* uline = *iter; - if (uline->IsModeSet(invisiblemode) || !InspIRCd::Match(uline->nick, mask)) + if (service->IsModeSet(invisiblemode) || !InspIRCd::Match(service->nick, mask)) continue; Numeric::Numeric numeric(RPL_SERVLIST); numeric - .push(uline->nick) - .push(uline->server->GetName()) + .push(service->nick) + .push(service->server->GetName()) .push(mask) .push(0) .push(0) - .push(uline->GetRealName()); + .push(service->GetRealName()); user->WriteNumeric(numeric); } user->WriteNumeric(RPL_SERVLISTEND, mask, 0, "End of service listing"); diff --git a/src/coremods/core_lusers.cpp b/src/coremods/core_lusers.cpp index 557537561..7efefe36d 100644 --- a/src/coremods/core_lusers.cpp +++ b/src/coremods/core_lusers.cpp @@ -40,7 +40,7 @@ struct LusersCounters for (user_hash::const_iterator i = users.begin(); i != users.end(); ++i) { User* u = i->second; - if (!u->server->IsULine() && u->IsModeSet(invisiblemode)) + if (!u->server->IsService() && u->IsModeSet(invisiblemode)) invisible++; } } @@ -128,7 +128,7 @@ public: if (dest->registered != REG_ALL) return; - if (dest->server->IsULine()) + if (dest->server->IsService()) return; if (adding) @@ -158,13 +158,13 @@ class ModuleLusers : public Module void OnPostConnect(User* user) override { counters.UpdateMaxUsers(); - if (!user->server->IsULine() && user->IsModeSet(invisiblemode)) + if (!user->server->IsService() && user->IsModeSet(invisiblemode)) counters.invisible++; } void OnUserQuit(User* user, const std::string& message, const std::string& oper_message) override { - if (!user->server->IsULine() && user->IsModeSet(invisiblemode)) + if (!user->server->IsService() && user->IsModeSet(invisiblemode)) counters.invisible--; } }; diff --git a/src/coremods/core_message.cpp b/src/coremods/core_message.cpp index 668fb2a57..886604a4d 100644 --- a/src/coremods/core_message.cpp +++ b/src/coremods/core_message.cpp @@ -361,7 +361,7 @@ class CommandSQuery : public SplitCommand target = ServerInstance->Users.FindNick(parameters[0]); } - if (!target || target->registered != REG_ALL || !target->server->IsULine()) + if (!target || target->registered != REG_ALL || !target->server->IsService()) { // The target user does not exist, is not fully registered, or is not a service. user->WriteNumeric(ERR_NOSUCHSERVICE, parameters[0], "No such service"); diff --git a/src/coremods/core_oper/cmd_kill.cpp b/src/coremods/core_oper/cmd_kill.cpp index 15c6bd6ed..640ec6610 100644 --- a/src/coremods/core_oper/cmd_kill.cpp +++ b/src/coremods/core_oper/cmd_kill.cpp @@ -112,7 +112,7 @@ CmdResult CommandKill::Handle(User* user, const Params& parameters) killreason.assign(parameters[1], 0, ServerInstance->Config->Limits.MaxQuit); } - if ((!hideservicekills) || (!user->server->IsULine())) + if ((!hideservicekills) || (!user->server->IsService())) { if (IS_LOCAL(user) && IS_LOCAL(target)) ServerInstance->SNO.WriteGlobalSno('k', "Local kill by %s: %s (%s)", user->nick.c_str(), target->GetFullRealHost().c_str(), parameters[1].c_str()); diff --git a/src/coremods/core_oper/umode_o.cpp b/src/coremods/core_oper/umode_o.cpp index d9d2a6e1c..055499bd4 100644 --- a/src/coremods/core_oper/umode_o.cpp +++ b/src/coremods/core_oper/umode_o.cpp @@ -35,7 +35,7 @@ ModeUserOperator::ModeUserOperator(Module* Creator) ModeAction ModeUserOperator::OnModeChange(User* source, User* dest, Channel*, std::string&, bool adding) { /* Only opers can execute this class at all */ - if (!source->server->IsULine() && !source->IsOper()) + if (!source->server->IsService() && !source->IsOper()) return MODEACTION_DENY; /* Not even opers can GIVE the +o mode, only take it away */ diff --git a/src/coremods/core_stats.cpp b/src/coremods/core_stats.cpp index 9de94929d..a31e91521 100644 --- a/src/coremods/core_stats.cpp +++ b/src/coremods/core_stats.cpp @@ -179,7 +179,7 @@ void CommandStats::DoStats(Stats::Context& stats) for (UserManager::OperList::const_iterator i = opers.begin(); i != opers.end(); ++i) { User* oper = *i; - if (!oper->server->IsULine()) + if (!oper->server->IsService()) { LocalUser* lu = IS_LOCAL(oper); stats.AddRow(249, oper->nick + " (" + oper->ident + "@" + oper->GetDisplayedHost() + ") Idle: " + diff --git a/src/modules/m_botmode.cpp b/src/modules/m_botmode.cpp index 6a766db4a..b9362c6eb 100644 --- a/src/modules/m_botmode.cpp +++ b/src/modules/m_botmode.cpp @@ -101,7 +101,7 @@ class ModuleBotMode return MOD_RES_PASSTHRU; // Allow sending PRIVMSGs to services pseudoclients. - if (target.type == MessageTarget::TYPE_USER && target.Get<User>()->server->IsULine()) + if (target.type == MessageTarget::TYPE_USER && target.Get<User>()->server->IsService()) return MOD_RES_PASSTHRU; // Force the message to be broadcast as a NOTICE. diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp index 87f988e75..4b2636623 100644 --- a/src/modules/m_chghost.cpp +++ b/src/modules/m_chghost.cpp @@ -61,7 +61,7 @@ class CommandChghost : public Command User* dest = ServerInstance->Users.Find(parameters[0]); // Allow services to change the host of unregistered users - if ((!dest) || ((dest->registered != REG_ALL) && (!user->server->IsULine()))) + if ((!dest) || ((dest->registered != REG_ALL) && (!user->server->IsService()))) { user->WriteNumeric(Numerics::NoSuchNick(parameters[0])); return CmdResult::FAILURE; @@ -69,9 +69,8 @@ class CommandChghost : public Command if (IS_LOCAL(dest)) { - if ((dest->ChangeDisplayedHost(parameters[1])) && (!user->server->IsULine())) + if ((dest->ChangeDisplayedHost(parameters[1])) && (!user->server->IsService())) { - // fix by brain - ulines set hosts silently ServerInstance->SNO.WriteGlobalSno('a', user->nick+" used CHGHOST to make the displayed host of "+dest->nick+" become "+dest->GetDisplayedHost()); } } diff --git a/src/modules/m_chgident.cpp b/src/modules/m_chgident.cpp index 889fc1720..1b9247c23 100644 --- a/src/modules/m_chgident.cpp +++ b/src/modules/m_chgident.cpp @@ -66,7 +66,7 @@ class CommandChgident : public Command { dest->ChangeIdent(parameters[1]); - if (!user->server->IsULine()) + if (!user->server->IsService()) ServerInstance->SNO.WriteGlobalSno('a', "%s used CHGIDENT to change %s's ident to '%s'", user->nick.c_str(), dest->nick.c_str(), dest->ident.c_str()); } diff --git a/src/modules/m_clearchan.cpp b/src/modules/m_clearchan.cpp index 5562b3ee7..42159b0e6 100644 --- a/src/modules/m_clearchan.cpp +++ b/src/modules/m_clearchan.cpp @@ -71,7 +71,7 @@ class CommandClearChan : public Command const std::string reason = parameters.size() > 2 ? parameters.back() : "Clearing " + chan->name; - if (!user->server->IsSilentULine()) + if (!user->server->IsSilentService()) ServerInstance->SNO.WriteToSnoMask((IS_LOCAL(user) ? 'a' : 'A'), user->nick + " has cleared \002" + chan->name + "\002 (" + method + "): " + reason); user->WriteNotice("Clearing \002" + chan->name + "\002 (" + method + "): " + reason); diff --git a/src/modules/m_commonchans.cpp b/src/modules/m_commonchans.cpp index 912689800..d9769d0ad 100644 --- a/src/modules/m_commonchans.cpp +++ b/src/modules/m_commonchans.cpp @@ -40,7 +40,7 @@ class ModuleCommonChans if (!targuser->IsModeSet(mode) || user->SharesChannelWith(targuser)) return MOD_RES_PASSTHRU; - if (user->HasPrivPermission("users/ignore-commonchans") || user->server->IsULine()) + if (user->HasPrivPermission("users/ignore-commonchans") || user->server->IsService()) return MOD_RES_PASSTHRU; user->WriteNumeric(Numerics::CannotSendTo(targuser, "messages", &mode)); diff --git a/src/modules/m_deaf.cpp b/src/modules/m_deaf.cpp index b8855c028..891637711 100644 --- a/src/modules/m_deaf.cpp +++ b/src/modules/m_deaf.cpp @@ -117,7 +117,7 @@ class ModuleDeaf : public Module if (!i->first->IsModeSet(deafmode)) continue; - bool is_a_service = i->first->server->IsULine(); + bool is_a_service = i->first->server->IsService(); // matched a U-line only bypass if (is_bypasschar_service && is_a_service) continue; @@ -136,7 +136,7 @@ class ModuleDeaf : public Module if (!targ->IsModeSet(privdeafmode)) return MOD_RES_PASSTHRU; - if (!privdeafservice && user->server->IsULine()) + if (!privdeafservice && user->server->IsService()) return MOD_RES_DENY; if (!user->HasPrivPermission("users/ignore-privdeaf")) diff --git a/src/modules/m_geoban.cpp b/src/modules/m_geoban.cpp index 0004c0e71..4e34a4589 100644 --- a/src/modules/m_geoban.cpp +++ b/src/modules/m_geoban.cpp @@ -71,7 +71,7 @@ class ModuleGeoBan void OnWhois(Whois::Context& whois) override { - if (whois.GetTarget()->server->IsULine()) + if (whois.GetTarget()->server->IsService()) return; Geolocation::Location* location = geoapi ? geoapi->GetLocation(whois.GetTarget()) : NULL; diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp index ba5d39aee..72f25ef80 100644 --- a/src/modules/m_hideoper.cpp +++ b/src/modules/m_hideoper.cpp @@ -152,7 +152,7 @@ class ModuleHideOper for (UserManager::OperList::const_iterator i = opers.begin(); i != opers.end(); ++i) { User* oper = *i; - if (!oper->server->IsULine() && (stats.GetSource()->IsOper() || !oper->IsModeSet(hm))) + if (!oper->server->IsService() && (stats.GetSource()->IsOper() || !oper->IsModeSet(hm))) { LocalUser* lu = IS_LOCAL(oper); stats.AddRow(249, oper->nick + " (" + oper->ident + "@" + oper->GetDisplayedHost() + ") Idle: " + diff --git a/src/modules/m_passforward.cpp b/src/modules/m_passforward.cpp index daf2a5ee7..d141ff4d4 100644 --- a/src/modules/m_passforward.cpp +++ b/src/modules/m_passforward.cpp @@ -98,9 +98,9 @@ class ModulePassForward : public Module if (!nickrequired.empty()) { - /* Check if nick exists and its server is ulined */ + /* Check if nick exists and is on a services server. */ User* u = ServerInstance->Users.Find(nickrequired); - if (!u || !u->server->IsULine()) + if (!u || !u->server->IsService()) return; } diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp index 99c446881..31d913f93 100644 --- a/src/modules/m_redirect.cpp +++ b/src/modules/m_redirect.cpp @@ -105,7 +105,7 @@ class ModuleRedirect : public Module { const std::string& channel = *re.ext.get(chan); - /* sometimes broken ulines can make circular or chained +L, avoid this */ + /* sometimes broken services can make circular or chained +L, avoid this */ Channel* destchan = ServerInstance->FindChan(channel); if (destchan && destchan->IsModeSet(re)) { diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp index 23bd7bf3e..789865a7c 100644 --- a/src/modules/m_remove.cpp +++ b/src/modules/m_remove.cpp @@ -98,7 +98,7 @@ class RemoveBase : public Command return CmdResult::FAILURE; } - if (target->server->IsULine()) + if (target->server->IsService()) { user->WriteNumeric(ERR_CHANOPRIVSNEEDED, channame, "Only a U-line may remove a U-line from a channel."); return CmdResult::FAILURE; @@ -109,7 +109,7 @@ class RemoveBase : public Command { /* We'll let everyone remove their level and below, eg: * ops can remove ops, halfops, voices, and those with no mode (no moders actually are set to 1) - a ulined target will get a higher level than it's possible for a /remover to get..so they're safe. + a services target will get a higher level than it's possible for a /remover to get..so they're safe. * Nobody may remove people with >= protectedrank rank. */ unsigned int ulevel = channel->GetPrefixValue(user); diff --git a/src/modules/m_restrictmsg.cpp b/src/modules/m_restrictmsg.cpp index ffa9a057d..f64419012 100644 --- a/src/modules/m_restrictmsg.cpp +++ b/src/modules/m_restrictmsg.cpp @@ -40,9 +40,9 @@ class ModuleRestrictMsg // message allowed if: // (1) the sender is opered // (2) the recipient is opered - // (3) the recipient is on a ulined server + // (3) the recipient is on a services server // anything else, blocked. - if (u->IsOper() || user->IsOper() || u->server->IsULine()) + if (u->IsOper() || user->IsOper() || u->server->IsService()) return MOD_RES_PASSTHRU; user->WriteNumeric(Numerics::CannotSendTo(u, "You cannot send messages to this user.")); diff --git a/src/modules/m_sajoin.cpp b/src/modules/m_sajoin.cpp index 012938a47..802b36903 100644 --- a/src/modules/m_sajoin.cpp +++ b/src/modules/m_sajoin.cpp @@ -58,7 +58,7 @@ class CommandSajoin : public Command return CmdResult::FAILURE; } - if (dest->server->IsULine()) + if (dest->server->IsService()) { user->WriteNumeric(ERR_NOPRIVILEGES, "Cannot use an SA command on a U-lined client"); return CmdResult::FAILURE; diff --git a/src/modules/m_sakick.cpp b/src/modules/m_sakick.cpp index 5a8675263..1da4c1684 100644 --- a/src/modules/m_sakick.cpp +++ b/src/modules/m_sakick.cpp @@ -45,7 +45,7 @@ class CommandSakick : public Command { const std::string& reason = (parameters.size() > 2) ? parameters[2] : dest->nick; - if (dest->server->IsULine()) + if (dest->server->IsService()) { user->WriteNumeric(ERR_NOPRIVILEGES, "Cannot use an SA command on a U-lined client"); return CmdResult::FAILURE; diff --git a/src/modules/m_sanick.cpp b/src/modules/m_sanick.cpp index 5d2416703..229f0919d 100644 --- a/src/modules/m_sanick.cpp +++ b/src/modules/m_sanick.cpp @@ -45,7 +45,7 @@ class CommandSanick : public Command /* Do local sanity checks and bails */ if (IS_LOCAL(user)) { - if (target && target->server->IsULine()) + if (target && target->server->IsService()) { user->WriteNumeric(ERR_NOPRIVILEGES, "Cannot use an SA command on a U-lined client"); return CmdResult::FAILURE; diff --git a/src/modules/m_sapart.cpp b/src/modules/m_sapart.cpp index 3b6813884..5ea200a97 100644 --- a/src/modules/m_sapart.cpp +++ b/src/modules/m_sapart.cpp @@ -51,7 +51,7 @@ class CommandSapart : public Command if (parameters.size() > 2) reason = parameters[2]; - if (dest->server->IsULine()) + if (dest->server->IsService()) { user->WriteNumeric(ERR_NOPRIVILEGES, "Cannot use an SA command on a U-lined client"); return CmdResult::FAILURE; diff --git a/src/modules/m_saquit.cpp b/src/modules/m_saquit.cpp index 26f6639dd..f337e4750 100644 --- a/src/modules/m_saquit.cpp +++ b/src/modules/m_saquit.cpp @@ -44,7 +44,7 @@ class CommandSaquit : public Command User* dest = ServerInstance->Users.Find(parameters[0]); if ((dest) && (dest->registered == REG_ALL)) { - if (dest->server->IsULine()) + if (dest->server->IsService()) { user->WriteNumeric(ERR_NOPRIVILEGES, "Cannot use an SA command on a U-lined client"); return CmdResult::FAILURE; diff --git a/src/modules/m_servprotect.cpp b/src/modules/m_servprotect.cpp index fa92d9947..3b0f7cba2 100644 --- a/src/modules/m_servprotect.cpp +++ b/src/modules/m_servprotect.cpp @@ -47,7 +47,7 @@ class ServProtectMode : public ModeHandler * way to add this mode and that is at client introduction in the UID command, * as this calls OnModeChange for each mode but disregards the return values. * The mode cannot be manually added or removed, not even by a server or by a remote - * user or uline, which prevents its (ab)use as a kiddie 'god mode' on such networks. + * user or service, which prevents its (ab)use as a kiddie 'god mode' on such networks. * I'm sure if someone really wants to do that they can make a copy of this module * that does the job. It won't be me though! */ @@ -83,7 +83,7 @@ class ModuleServProtectMode ModResult OnRawMode(User* user, Channel* chan, ModeHandler* mh, const std::string& param, bool adding) override { /* Check that the mode is not a server mode, it is being removed, the user making the change is local, there is a parameter, - * and the user making the change is not a uline + * and the user making the change is not a service. */ if (!adding && chan && IS_LOCAL(user) && !param.empty()) { diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp index a883e35b5..600572a90 100644 --- a/src/modules/m_silence.cpp +++ b/src/modules/m_silence.cpp @@ -416,7 +416,7 @@ class ModuleSilence if (!IS_LOCAL(target)) return true; - if (exemptservice && source->server->IsULine()) + if (exemptservice && source->server->IsService()) return true; SilenceList* list = cmd.ext.get(target); diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 0bb80a0f5..2a3933a46 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -123,7 +123,7 @@ void ModuleSpanningTree::ShowLinks(TreeServer* Current, User* user, int hops) for (TreeServer::ChildServers::const_iterator i = children.begin(); i != children.end(); ++i) { TreeServer* server = *i; - if ((server->Hidden) || ((Utils->HideServices) && (server->IsULine()))) + if ((server->Hidden) || ((Utils->HideServices) && (server->IsService()))) { if (user->IsOper()) { @@ -135,8 +135,8 @@ void ModuleSpanningTree::ShowLinks(TreeServer* Current, User* user, int hops) ShowLinks(server, user, hops+1); } } - /* Don't display the line if its a uline, hide ulines is on, and the user isn't an oper */ - if ((Utils->HideServices) && (Current->IsULine()) && (!user->IsOper())) + /* Don't display the line if its a service, hide services is on, and the user isn't an oper */ + if ((Utils->HideServices) && (Current->IsService()) && (!user->IsOper())) return; /* Or if the server is hidden and they're not an oper */ else if ((Current->Hidden) && (!user->IsOper())) @@ -572,9 +572,9 @@ void ModuleSpanningTree::OnUserQuit(User* user, const std::string &reason, const { // Hide the message if one of the following is true: // - User is being quit due to a netsplit and quietbursts is on - // - Server is a silent uline + // - User is on a silent services server TreeServer* server = TreeServer::Get(user); - bool hide = (((server->IsDead()) && (Utils->quiet_bursts)) || (server->IsSilentULine())); + bool hide = (((server->IsDead()) && (Utils->quiet_bursts)) || (server->IsSilentService())); if (!hide) { ServerInstance->SNO.WriteToSnoMask('Q', "Client exiting on server %s: %s (%s) [%s]", diff --git a/src/modules/m_spanningtree/opertype.cpp b/src/modules/m_spanningtree/opertype.cpp index 986d35dc7..24e818397 100644 --- a/src/modules/m_spanningtree/opertype.cpp +++ b/src/modules/m_spanningtree/opertype.cpp @@ -49,11 +49,11 @@ CmdResult CommandOpertype::HandleRemote(RemoteUser* u, CommandBase::Params& para if (Utils->quiet_bursts) { /* - * If quiet bursts are enabled, and server is bursting or silent uline (i.e. services), + * If quiet bursts are enabled, and server is bursting or a silent services server * then do nothing. -- w00t */ TreeServer* remoteserver = TreeServer::Get(u); - if (remoteserver->IsBehindBursting() || remoteserver->IsSilentULine()) + if (remoteserver->IsBehindBursting() || remoteserver->IsSilentService()) return CmdResult::SUCCESS; } diff --git a/src/modules/m_spanningtree/override_map.cpp b/src/modules/m_spanningtree/override_map.cpp index 86c2fba39..3be35e9ef 100644 --- a/src/modules/m_spanningtree/override_map.cpp +++ b/src/modules/m_spanningtree/override_map.cpp @@ -46,7 +46,7 @@ static inline bool IsHidden(User* user, TreeServer* server) { if (server->Hidden) return true; - if (Utils->HideServices && server->IsULine()) + if (Utils->HideServices && server->IsService()) return true; } diff --git a/src/modules/m_spanningtree/tags.cpp b/src/modules/m_spanningtree/tags.cpp index e4eca54c8..e02235afb 100644 --- a/src/modules/m_spanningtree/tags.cpp +++ b/src/modules/m_spanningtree/tags.cpp @@ -28,7 +28,7 @@ ServiceTag::ServiceTag(Module* mod) void ServiceTag::OnPopulateTags(ClientProtocol::Message& msg) { User* const user = msg.GetSourceUser(); - if (user && user->server->IsULine()) + if (user && user->server->IsService()) msg.AddTag("inspircd.org/service", this, ""); } diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp index 80e46f210..ca9773fde 100644 --- a/src/modules/m_spanningtree/treeserver.cpp +++ b/src/modules/m_spanningtree/treeserver.cpp @@ -68,7 +68,7 @@ TreeServer::TreeServer(const std::string& Name, const std::string& Desc, const s , Hidden(Hide) { ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "New server %s behind_bursting %u", GetName().c_str(), behind_bursting); - CheckULine(); + CheckService(); ServerInstance->Timers.AddTimer(&pingtimer); @@ -238,9 +238,9 @@ unsigned int TreeServer::QuitUsers(const std::string& reason) return original_size - users.size(); } -void TreeServer::CheckULine() +void TreeServer::CheckService() { - uline = silentuline = false; + service = silentservice = false; for (auto& [_, tag] : ServerInstance->Config->ConfTags("service", ServerInstance->Config->ConfTags("uline"))) { @@ -249,12 +249,12 @@ void TreeServer::CheckULine() { if (this->IsRoot()) { - ServerInstance->Logs.Log(MODNAME, LOG_DEFAULT, "Servers should not uline themselves (at " + tag->source.str() + ")"); + ServerInstance->Logs.Log(MODNAME, LOG_DEFAULT, "Servers should not mark themselves as a service (at " + tag->source.str() + ")"); return; } - uline = true; - silentuline = tag->getBool("silent"); + service = true; + silentservice = tag->getBool("silent"); break; } } diff --git a/src/modules/m_spanningtree/treeserver.h b/src/modules/m_spanningtree/treeserver.h index 1e7c30a1a..7a14b2373 100644 --- a/src/modules/m_spanningtree/treeserver.h +++ b/src/modules/m_spanningtree/treeserver.h @@ -206,9 +206,9 @@ class TreeServer : public Server /** Recursive call for child servers */ void FinishBurstInternal(); - /** (Re)check the uline state of this server + /** (Re)check the service state of this server */ - void CheckULine(); + void CheckService(); /** Get the bursting state of this server * @return True if this server is bursting, false if it isn't diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp index 36a62caad..1a53b8bc4 100644 --- a/src/modules/m_spanningtree/uid.cpp +++ b/src/modules/m_spanningtree/uid.cpp @@ -126,7 +126,7 @@ CmdResult CommandUID::HandleServer(TreeServer* remoteserver, CommandBase::Params bool dosend = true; - if ((Utils->quiet_bursts && remoteserver->IsBehindBursting()) || _new->server->IsSilentULine()) + if ((Utils->quiet_bursts && remoteserver->IsBehindBursting()) || _new->server->IsSilentService()) dosend = false; if (dosend) diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp index 5f7be9a5a..41451cc05 100644 --- a/src/modules/m_spanningtree/utils.cpp +++ b/src/modules/m_spanningtree/utils.cpp @@ -330,7 +330,7 @@ void SpanningTreeUtilities::ReadConfiguration() } for (server_hash::const_iterator i = serverlist.begin(); i != serverlist.end(); ++i) - i->second->CheckULine(); + i->second->CheckService(); RefreshIPCache(); } diff --git a/src/modules/m_sslmodes.cpp b/src/modules/m_sslmodes.cpp index 297fdcfb9..28dc65b9d 100644 --- a/src/modules/m_sslmodes.cpp +++ b/src/modules/m_sslmodes.cpp @@ -91,7 +91,7 @@ class SSLMode : public ModeHandler for (Channel::MemberMap::const_iterator i = userlist.begin(); i != userlist.end(); ++i) { ssl_cert* cert = API->GetCertificate(i->first); - if (!cert && !i->first->server->IsULine()) + if (!cert && !i->first->server->IsService()) nonssl++; } @@ -211,8 +211,8 @@ class ModuleSSLModes User* target = msgtarget.Get<User>(); - /* If one or more of the parties involved is a ulined service, we won't stop it. */ - if (user->server->IsULine() || target->server->IsULine()) + /* If one or more of the parties involved is a services user, we won't stop it. */ + if (user->server->IsService() || target->server->IsService()) return MOD_RES_PASSTHRU; /* If the target is +z */ diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp index 867c7ee67..51f4f50c4 100644 --- a/src/modules/m_svshold.cpp +++ b/src/modules/m_svshold.cpp @@ -110,9 +110,9 @@ class CommandSvshold : public Command /* syntax: svshold nickname time :reason goes here */ /* 'time' is a human-readable timestring, like 2d3h2s. */ - if (!user->server->IsULine()) + if (!user->server->IsService()) { - /* don't allow SVSHOLD from non-ulined clients */ + /* don't allow SVSHOLD from non-services clients */ return CmdResult::FAILURE; } diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp index c64522e7b..cbd8a3574 100644 --- a/src/modules/m_swhois.cpp +++ b/src/modules/m_swhois.cpp @@ -63,11 +63,11 @@ class CommandSwhois : public Command if (text) { // We already had it set... - if (!user->server->IsULine()) + if (!user->server->IsService()) // Ulines set SWHOISes silently ServerInstance->SNO.WriteGlobalSno('a', "%s used SWHOIS to set %s's extra whois from '%s' to '%s'", user->nick.c_str(), dest->nick.c_str(), text->c_str(), parameters[1].c_str()); } - else if (!user->server->IsULine()) + else if (!user->server->IsService()) { // Ulines set SWHOISes silently ServerInstance->SNO.WriteGlobalSno('a', "%s used SWHOIS to set %s's extra whois to '%s'", user->nick.c_str(), dest->nick.c_str(), parameters[1].c_str()); diff --git a/src/modules/m_topiclock.cpp b/src/modules/m_topiclock.cpp index 6cc88b8df..c5018ecd7 100644 --- a/src/modules/m_topiclock.cpp +++ b/src/modules/m_topiclock.cpp @@ -36,7 +36,7 @@ class CommandSVSTOPIC : public Command CmdResult Handle(User* user, const Params& parameters) override { - if (!user->server->IsULine()) + if (!user->server->IsService()) { // Ulines only return CmdResult::FAILURE; diff --git a/src/users.cpp b/src/users.cpp index 0e049dbef..2cf72d8e2 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -88,8 +88,8 @@ User::User(const std::string& uid, Server* srv, Type type) ServerInstance->Logs.Log("USERS", LOG_DEBUG, "New UUID for user: %s", uuid.c_str()); - if (srv->IsULine()) - ServerInstance->Users.all_ulines.push_back(this); + if (srv->IsService()) + ServerInstance->Users.all_services.push_back(this); // Do not insert FakeUsers into the uuidlist so FindUUID() won't return them which is the desired behavior if (type != User::TYPE_SERVER) @@ -356,8 +356,8 @@ CullResult User::cull() if (client_sa.family() != AF_UNSPEC) ServerInstance->Users.RemoveCloneCounts(this); - if (server->IsULine()) - stdalgo::erase(ServerInstance->Users.all_ulines, this); + if (server->IsService()) + stdalgo::erase(ServerInstance->Users.all_services, this); return Extensible::cull(); } |
