mirror of
https://github.com/anope/anope.git
synced 2026-07-01 09:46:40 +02:00
Return references instead of pointers from the config system.
We used to return NULL from these methods but now we return an empty block so this can never actually be null now.
This commit is contained in:
+3
-3
@@ -237,7 +237,7 @@ void MOTD::Run(MessageSource &source, const std::vector<Anope::string> ¶ms,
|
||||
if (s != Me)
|
||||
return;
|
||||
|
||||
auto motdfile = Anope::ExpandConfig(Config->GetBlock("serverinfo")->Get<const Anope::string>("motd"));
|
||||
auto motdfile = Anope::ExpandConfig(Config->GetBlock("serverinfo").Get<const Anope::string>("motd"));
|
||||
std::ifstream stream(motdfile.str());
|
||||
if (!stream.is_open())
|
||||
{
|
||||
@@ -405,7 +405,7 @@ void Stats::Run(MessageSource &source, const std::vector<Anope::string> ¶ms,
|
||||
case 'o':
|
||||
case 'O':
|
||||
/* Check whether the user is an operator */
|
||||
if (!u->HasMode("OPER") && Config->GetBlock("options")->Get<bool>("hidestatso"))
|
||||
if (!u->HasMode("OPER") && Config->GetBlock("options").Get<bool>("hidestatso"))
|
||||
IRCD->SendNumeric(RPL_STATSLINKINFO, source.GetSource(), params[0][0], "End of /STATS report.");
|
||||
else
|
||||
{
|
||||
@@ -473,7 +473,7 @@ void Whois::Run(MessageSource &source, const std::vector<Anope::string> ¶ms,
|
||||
IRCD->SendNumeric(RPL_WHOISUSER, source.GetSource(), u->nick, u->GetIdent(), u->host, '*', u->realname);
|
||||
if (bi)
|
||||
IRCD->SendNumeric(RPL_WHOISREGNICK, source.GetSource(), bi->nick, "is a registered nick");
|
||||
IRCD->SendNumeric(RPL_WHOISSERVER, source.GetSource(), u->nick, Me->GetName(), Config->GetBlock("serverinfo")->Get<const Anope::string>("description"));
|
||||
IRCD->SendNumeric(RPL_WHOISSERVER, source.GetSource(), u->nick, Me->GetName(), Config->GetBlock("serverinfo").Get<const Anope::string>("description"));
|
||||
if (bi)
|
||||
IRCD->SendNumeric(RPL_WHOISIDLE, source.GetSource(), bi->nick, Anope::CurTime - bi->lastmsg, bi->signon, "seconds idle, signon time");
|
||||
IRCD->SendNumeric(RPL_WHOISOPERATOR, source.GetSource(), u->nick, "is a Network Service");
|
||||
|
||||
Reference in New Issue
Block a user