From f83322c93800a528cf74811523ed90560092b715 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 28 Aug 2007 18:02:01 +0000 Subject: Tidy up duplicate code, provide GetSID() method on ServerConfig which returns the SID always 3 digits long git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7959 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/configreader.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/configreader.cpp') diff --git a/src/configreader.cpp b/src/configreader.cpp index c5f37a1e4..2ee99f1af 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -1716,6 +1716,14 @@ InspIRCd* ServerConfig::GetInstance() return ServerInstance; } +std::string ServerConfig::GetSID() +{ + std::string OurSID; + OurSID += (char)((Instance->Config->sid / 100) + 48); + OurSID += (char)((Instance->Config->sid / 10) % 10 + 48); + OurSID += (char)(Instance->Config->sid % 10 + 48); + return OurSID; +} ValueItem::ValueItem(int value) { -- cgit v1.3.1-10-gc9f91