summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/init.cpp6
-rw-r--r--src/servers.cpp8
2 files changed, 14 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 0f2f30a58..1a5293f37 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -403,6 +403,12 @@ void Init(int ac, char **av)
else if (ModuleManager::FindFirstOf(ENCRYPTION) == NULL)
throw FatalException("You must load at least one encryption module");
+ if (ircd->ts6 && Config->Numeric.empty());
+ {
+ Anope::string numeric = ts6_sid_retrieve();
+ Me->SetSID(numeric);
+ Config->Numeric = numeric;
+ }
for (botinfo_map::iterator it = BotListByNick.begin(), it_end = BotListByNick.end(); it != it_end; ++it)
{
it->second->GenerateUID();
diff --git a/src/servers.cpp b/src/servers.cpp
index 65aeb4767..2ebf555c7 100644
--- a/src/servers.cpp
+++ b/src/servers.cpp
@@ -171,6 +171,14 @@ const Anope::string &Server::GetDescription() const
return this->Description;
}
+/** Change this servers SID
+ * @param sid The new SID
+ */
+void Server::SetSID(const Anope::string &sid)
+{
+ this->SID = sid;
+}
+
/** Get the server numeric/SID
* @return The numeric/SID
*/