From 90fb9e8c29998528d6e0e508d2e59b3f939d8fd4 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Fri, 1 Apr 2011 21:22:14 +0200 Subject: [PATCH] Re-add the ISpoof{File,Format} handling which was lost Whoops, someone here failed at rebasing stuff. Signed-off-by: Uli Schlachter --- znc.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/znc.cpp b/znc.cpp index bf534735..cac3de81 100644 --- a/znc.cpp +++ b/znc.cpp @@ -1096,6 +1096,35 @@ bool CZNC::DoRehash(CString& sError) msModules[sModName] = sArgs; } + CString sISpoofFormat, sISpoofFile; + config.FindStringEntry("ispoofformat", sISpoofFormat); + config.FindStringEntry("ispooffile", sISpoofFile); + if (!sISpoofFormat.empty() || !sISpoofFile.empty()) { + CModule *pIdentFileMod = GetModules().FindModule("identfile"); + if (!pIdentFileMod) { + CUtils::PrintAction("Loading Global Module [identfile]"); + + CString sModRet; + bool bModRet = GetModules().LoadModule("identfile", "", NULL, sModRet); + + if (bModRet) { + sModRet = sModRet.Token(1, true, "identfile] "); + } + + CUtils::PrintStatus(bModRet, sModRet); + if (!bModRet) { + sError = sModRet; + return false; + } + + pIdentFileMod = GetModules().FindModule("identfile"); + msModules["identfile"] = ""; + } + + pIdentFileMod->SetNV("File", sISpoofFile); + pIdentFileMod->SetNV("Format", sISpoofFormat); + } + config.FindStringVector("motd", vsList); for (vit = vsList.begin(); vit != vsList.end(); ++vit) { AddMotd(*vit);