diff --git a/znc.cpp b/znc.cpp index b681791b..e674be32 100644 --- a/znc.cpp +++ b/znc.cpp @@ -23,6 +23,18 @@ CZNC::~CZNC() { DeleteUsers(); } +string CZNC::GetTag(bool bIncludeVersion) { + if (!bIncludeVersion) { + return "ZNC - by prozac@gmail.com"; + } + + char szBuf[32]; + memset(szBuf, 0, 32); + snprintf(szBuf, 32, "ZNC %1.3f - by prozac@gmail.com", VERSION); + + return szBuf; +} + bool CZNC::OnBoot() { for (map::iterator it = m_msUsers.begin(); it != m_msUsers.end(); it++) { if (!it->second->OnBoot()) { diff --git a/znc.h b/znc.h index 76c45d28..e275f318 100644 --- a/znc.h +++ b/znc.h @@ -26,6 +26,7 @@ public: bool OnBoot(); string GetConfigPath(const string& sConfigFile); bool WriteNewConfig(const string& sConfig); + static string GetTag(bool bIncludeVersion = true); // Getters TSocketManager& GetManager() { return m_Manager; }