From e50580aba29d77ec7b817d992ba4f162dda5155f Mon Sep 17 00:00:00 2001 From: prozacx Date: Mon, 2 May 2005 06:14:25 +0000 Subject: [PATCH] Added module loading into auto conf generator git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@230 726aef4b-f618-498e-8847-2d620e286838 --- znc.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/znc.cpp b/znc.cpp index 3b659302..8e1e96a5 100644 --- a/znc.cpp +++ b/znc.cpp @@ -308,9 +308,26 @@ bool CZNC::WriteNewConfig(const string& sConfig) { vsLines.push_back("\tChanModes = " + sAnswer); } + set ssMods; + CModules::GetAvailableMods(ssMods); + + if (ssMods.size()) { + vsLines.push_back(""); + CUtils::PrintMessage(""); + CUtils::PrintMessage("-- Modules --"); + CUtils::PrintMessage(""); + + for (set::iterator it = ssMods.begin(); it != ssMods.end(); it++) { + const CModInfo& Info = *it; + if (CUtils::GetBoolInput("Do you want to auto load \033[1m" + Info.GetName() + "\033[22m", false)) { + vsLines.push_back("\tLoadModule = " + Info.GetName()); + } + } + } + vsLines.push_back(""); CUtils::PrintMessage(""); - CUtils::PrintMessage("Now we need to setup some servers for this user to connect to..."); + CUtils::PrintMessage("-- IRC Servers --"); CUtils::PrintMessage(""); do { @@ -331,7 +348,7 @@ bool CZNC::WriteNewConfig(const string& sConfig) { vsLines.push_back(""); CUtils::PrintMessage(""); - CUtils::PrintMessage("Now we need to setup some channels that this user will join once connected..."); + CUtils::PrintMessage("-- Channels --"); CUtils::PrintMessage(""); string sArg = "a";