aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-02-28 16:32:27 +0000
committerGravatar Sadie Powell2023-02-28 16:32:27 +0000
commit166a47ac68ab571ca1aacaaf8c0edfff26f8d59e (patch)
tree8547b7d9652b66cd51425b6c9474f4148db489b1 /src/modules
parentRemove an unnecessary function call in the pbkdf2 module. (diff)
Remove GetSID, rename sid to ServerId.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_httpd_stats.cpp2
-rw-r--r--src/modules/m_ircv3_msgid.cpp2
-rw-r--r--src/modules/m_spanningtree/capab.cpp14
-rw-r--r--src/modules/m_spanningtree/commandbuilder.h2
-rw-r--r--src/modules/m_spanningtree/encap.cpp2
-rw-r--r--src/modules/m_spanningtree/main.cpp2
-rw-r--r--src/modules/m_spanningtree/ping.cpp2
-rw-r--r--src/modules/m_spanningtree/pong.cpp2
-rw-r--r--src/modules/m_spanningtree/server.cpp7
-rw-r--r--src/modules/m_spanningtree/treeserver.cpp2
10 files changed, 26 insertions, 11 deletions
diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp
index fcc0e65d7..d160386ab 100644
--- a/src/modules/m_httpd_stats.cpp
+++ b/src/modules/m_httpd_stats.cpp
@@ -140,7 +140,7 @@ namespace Stats
void ServerInfo(XMLSerializer& serializer)
{
serializer.BeginBlock("server")
- .Attribute("id", ServerInstance->Config->GetSID())
+ .Attribute("id", ServerInstance->Config->ServerId)
.Attribute("name", ServerInstance->Config->ServerName)
.Attribute("description", ServerInstance->Config->ServerDesc)
.Attribute("customversion", ServerInstance->Config->CustomVersion)
diff --git a/src/modules/m_ircv3_msgid.cpp b/src/modules/m_ircv3_msgid.cpp
index 3e08d5e4a..96c6b2f47 100644
--- a/src/modules/m_ircv3_msgid.cpp
+++ b/src/modules/m_ircv3_msgid.cpp
@@ -47,7 +47,7 @@ class MsgIdGenerator final
public:
MsgIdGenerator()
- : strid(INSP_FORMAT("{}~{}~", ServerInstance->Config->GetSID(), ServerInstance->startup_time))
+ : strid(INSP_FORMAT("{}~{}~", ServerInstance->Config->ServerId, ServerInstance->startup_time))
, baselen(strid.length())
{
}
diff --git a/src/modules/m_spanningtree/capab.cpp b/src/modules/m_spanningtree/capab.cpp
index a59a73a3b..d0b974131 100644
--- a/src/modules/m_spanningtree/capab.cpp
+++ b/src/modules/m_spanningtree/capab.cpp
@@ -568,7 +568,12 @@ bool TreeSocket::Capab(const CommandBase::Params& params)
if (!this->GetTheirChallenge().empty() && (this->LinkState == CONNECTING))
{
this->SendCapabilities(2);
- this->WriteLine("SERVER " + ServerInstance->Config->ServerName + " " + TreeSocket::MakePass(capab->link->SendPass, capab->theirchallenge) + " 0 " + ServerInstance->Config->GetSID() + " :" + ServerInstance->Config->ServerDesc);
+ this->WriteLine(INSP_FORMAT("SERVER {} {} 0 {} :{}",
+ ServerInstance->Config->ServerName,
+ TreeSocket::MakePass(capab->link->SendPass, capab->theirchallenge),
+ ServerInstance->Config->ServerId,
+ ServerInstance->Config->ServerDesc
+ ));
}
}
else
@@ -577,7 +582,12 @@ bool TreeSocket::Capab(const CommandBase::Params& params)
if (this->LinkState == CONNECTING)
{
this->SendCapabilities(2);
- this->WriteLine("SERVER "+ServerInstance->Config->ServerName+" "+capab->link->SendPass+" 0 "+ServerInstance->Config->GetSID()+" :"+ServerInstance->Config->ServerDesc);
+ this->WriteLine(INSP_FORMAT("SERVER {} {} 0 {} :{}",
+ ServerInstance->Config->ServerName,
+ capab->link->SendPass,
+ ServerInstance->Config->ServerId,
+ ServerInstance->Config->ServerDesc
+ ));
}
}
}
diff --git a/src/modules/m_spanningtree/commandbuilder.h b/src/modules/m_spanningtree/commandbuilder.h
index e724d8d95..f9369e2ed 100644
--- a/src/modules/m_spanningtree/commandbuilder.h
+++ b/src/modules/m_spanningtree/commandbuilder.h
@@ -49,7 +49,7 @@ protected:
public:
CmdBuilder(const char* cmd)
{
- content.append(ServerInstance->Config->GetSID());
+ content.append(ServerInstance->Config->ServerId);
push(cmd);
FireEvent(ServerInstance->FakeClient->server, cmd, tags);
}
diff --git a/src/modules/m_spanningtree/encap.cpp b/src/modules/m_spanningtree/encap.cpp
index 4e4524789..be4244ce6 100644
--- a/src/modules/m_spanningtree/encap.cpp
+++ b/src/modules/m_spanningtree/encap.cpp
@@ -30,7 +30,7 @@
/** ENCAP */
CmdResult CommandEncap::Handle(User* user, Params& params)
{
- if (ServerInstance->Config->GetSID() == params[0] || InspIRCd::Match(ServerInstance->Config->ServerName, params[0]))
+ if (ServerInstance->Config->ServerId == params[0] || InspIRCd::Match(ServerInstance->Config->ServerName, params[0]))
{
CommandBase::Params plist(params.begin() + 2, params.end());
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 3f5885297..23f4f11a6 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -876,7 +876,7 @@ ModuleSpanningTree::~ModuleSpanningTree()
{
ServerInstance->PI = &ServerInstance->DefaultProtocolInterface;
- auto* newsrv = new Server(ServerInstance->Config->GetSID(), ServerInstance->Config->ServerName, ServerInstance->Config->ServerDesc);
+ auto* newsrv = new Server(ServerInstance->Config->ServerId, ServerInstance->Config->ServerName, ServerInstance->Config->ServerDesc);
SetLocalUsersServer(newsrv);
delete Utils;
diff --git a/src/modules/m_spanningtree/ping.cpp b/src/modules/m_spanningtree/ping.cpp
index d1e0f645c..5fc8423bf 100644
--- a/src/modules/m_spanningtree/ping.cpp
+++ b/src/modules/m_spanningtree/ping.cpp
@@ -29,7 +29,7 @@
CmdResult CommandPing::Handle(User* user, Params& params)
{
- if (params[0] == ServerInstance->Config->GetSID())
+ if (params[0] == ServerInstance->Config->ServerId)
{
// PING for us, reply with a PONG
CmdBuilder reply("PONG");
diff --git a/src/modules/m_spanningtree/pong.cpp b/src/modules/m_spanningtree/pong.cpp
index 7d137eef9..62ff44c5b 100644
--- a/src/modules/m_spanningtree/pong.cpp
+++ b/src/modules/m_spanningtree/pong.cpp
@@ -35,7 +35,7 @@ CmdResult CommandPong::HandleServer(TreeServer* server, CommandBase::Params& par
server->FinishBurst();
}
- if (params[0] == ServerInstance->Config->GetSID())
+ if (params[0] == ServerInstance->Config->ServerId)
{
// PONG for us
server->OnPong();
diff --git a/src/modules/m_spanningtree/server.cpp b/src/modules/m_spanningtree/server.cpp
index 7ca57f114..d68b39b17 100644
--- a/src/modules/m_spanningtree/server.cpp
+++ b/src/modules/m_spanningtree/server.cpp
@@ -222,7 +222,12 @@ bool TreeSocket::Inbound_Server(CommandBase::Params& params)
// Send our details: Our server name and description and hopcount of 0,
// along with the sendpass from this block.
- this->WriteLine("SERVER " + ServerInstance->Config->ServerName + " " + TreeSocket::MakePass(x->SendPass, this->GetTheirChallenge()) + " 0 " + ServerInstance->Config->GetSID() + " :" + ServerInstance->Config->ServerDesc);
+ this->WriteLine(INSP_FORMAT("SERVER {} {} 0 {} :{}",
+ ServerInstance->Config->ServerName,
+ TreeSocket::MakePass(x->SendPass, this->GetTheirChallenge()),
+ ServerInstance->Config->ServerId,
+ ServerInstance->Config->ServerDesc
+ ));
// move to the next state, we are now waiting for THEM.
this->LinkState = WAIT_AUTH_2;
diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp
index 2925ad1d9..f7e28ae6e 100644
--- a/src/modules/m_spanningtree/treeserver.cpp
+++ b/src/modules/m_spanningtree/treeserver.cpp
@@ -36,7 +36,7 @@
* no socket associated with it. Its version string is our own local version.
*/
TreeServer::TreeServer()
- : Server(ServerInstance->Config->GetSID(), ServerInstance->Config->ServerName, ServerInstance->Config->ServerDesc)
+ : Server(ServerInstance->Config->ServerId, ServerInstance->Config->ServerName, ServerInstance->Config->ServerDesc)
, pingtimer(this)
, ServerUser(ServerInstance->FakeClient)
, age(ServerInstance->Time())