mirror of
https://github.com/znc/znc.git
synced 2026-07-04 00:41:38 +02:00
Rename controlpanel to control, fix #240
It's just a shorter name, and hopefully still not as confusing as old "admin". Also unrelated change: fix case of few output lines during startup.
This commit is contained in:
@@ -753,11 +753,18 @@ class CAdminMod : public CModule {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(pUser->FindNetwork(sNetwork))) {
|
||||
CIRCNetwork* pNetwork = pUser->FindNetwork(sNetwork);
|
||||
|
||||
if (!pNetwork) {
|
||||
PutModule(pUser->GetUserName() + " does not have a network named [" + sNetwork + "]");
|
||||
return;
|
||||
}
|
||||
|
||||
if (pNetwork == m_pNetwork) {
|
||||
PutModule("Currently active network can be deleted via *status");
|
||||
return;
|
||||
}
|
||||
|
||||
if (pUser->DeleteNetwork(sNetwork)) {
|
||||
PutModule("Network deleted [" + sNetwork + "]");
|
||||
} else {
|
||||
@@ -1126,7 +1133,7 @@ public:
|
||||
};
|
||||
|
||||
template<> void TModInfo<CAdminMod>(CModInfo& Info) {
|
||||
Info.SetWikiPage("controlpanel");
|
||||
Info.SetWikiPage("control");
|
||||
}
|
||||
|
||||
USERMODULEDEFS(CAdminMod, "Dynamic configuration through IRC. Allows editing only yourself if you're not ZNC admin.")
|
||||
+2
-2
@@ -313,7 +313,7 @@ bool CIRCNetwork::ParseConfig(CConfig *pConfig, CString& sError, bool bUpgrade)
|
||||
sModName = "awaystore";
|
||||
}
|
||||
|
||||
CUtils::PrintAction("Loading Module [" + sModName + "]");
|
||||
CUtils::PrintAction("Loading network module [" + sModName + "]");
|
||||
CString sModRet;
|
||||
CString sArgs = sValue.Token(1, true);
|
||||
|
||||
@@ -329,7 +329,7 @@ bool CIRCNetwork::ParseConfig(CConfig *pConfig, CString& sError, bool bUpgrade)
|
||||
|
||||
pConfig->FindStringVector("server", vsList);
|
||||
for (vit = vsList.begin(); vit != vsList.end(); ++vit) {
|
||||
CUtils::PrintAction("Adding Server [" + *vit + "]");
|
||||
CUtils::PrintAction("Adding server [" + *vit + "]");
|
||||
CUtils::PrintStatus(AddServer(*vit));
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -376,12 +376,12 @@ bool CUser::ParseConfig(CConfig* pConfig, CString& sError) {
|
||||
}
|
||||
|
||||
// XXX Legacy crap, added in ZNC 0.207
|
||||
if (sModName == "admin") {
|
||||
CUtils::PrintMessage("NOTICE: [admin] module was renamed, loading [controlpanel] instead");
|
||||
sModName = "controlpanel";
|
||||
if (sModName == "admin" || sModName == "controlpanel") {
|
||||
CUtils::PrintMessage("NOTICE: [admin] module was renamed, loading [control] instead");
|
||||
sModName = "control";
|
||||
}
|
||||
|
||||
CUtils::PrintAction("Loading Module [" + sModName + "]");
|
||||
CUtils::PrintAction("Loading user module [" + sModName + "]");
|
||||
CString sModRet;
|
||||
CString sArgs = sValue.Token(1, true);
|
||||
bool bModRet = true;
|
||||
|
||||
+7
-7
@@ -524,7 +524,7 @@ CString CZNC::MakeConfigHeader() {
|
||||
"// WARNING\n"
|
||||
"//\n"
|
||||
"// Do NOT edit this file while ZNC is running!\n"
|
||||
"// Use webadmin or *controlpanel instead.\n"
|
||||
"// Use webadmin or *control instead.\n"
|
||||
"//\n"
|
||||
"// Buf if you feel risky, you might want to read help on /znc saveconfig and /znc rehash.\n"
|
||||
"// Also check http://en.znc.in/wiki/Configuration\n";
|
||||
@@ -956,7 +956,7 @@ bool CZNC::WriteNewConfig(const CString& sConfigFile) {
|
||||
}
|
||||
|
||||
size_t CZNC::FilterUncommonModules(set<CModInfo>& ssModules) {
|
||||
const char* ns[] = { "webadmin", "controlpanel",
|
||||
const char* ns[] = { "webadmin", "control",
|
||||
"chansaver", "keepnick", "simple_away", "partyline",
|
||||
"kickrejoin", "nickserv", "perform" };
|
||||
const set<CString> ssNames(ns, ns + sizeof(ns) / sizeof(ns[0]));
|
||||
@@ -1030,7 +1030,7 @@ bool CZNC::DoRehash(CString& sError)
|
||||
{
|
||||
sError.clear();
|
||||
|
||||
CUtils::PrintAction("Opening Config [" + m_sConfigFile + "]");
|
||||
CUtils::PrintAction("Opening config [" + m_sConfigFile + "]");
|
||||
|
||||
if (!CFile::Exists(m_sConfigFile)) {
|
||||
sError = "No such file";
|
||||
@@ -1123,7 +1123,7 @@ bool CZNC::DoRehash(CString& sError)
|
||||
|
||||
pOldMod = GetModules().FindModule(sModName);
|
||||
if (!pOldMod) {
|
||||
CUtils::PrintAction("Loading Global Module [" + sModName + "]");
|
||||
CUtils::PrintAction("Loading global module [" + sModName + "]");
|
||||
|
||||
bool bModRet = GetModules().LoadModule(sModName, sArgs, CModInfo::GlobalModule, NULL, NULL, sModRet);
|
||||
|
||||
@@ -1133,7 +1133,7 @@ bool CZNC::DoRehash(CString& sError)
|
||||
return false;
|
||||
}
|
||||
} else if (pOldMod->GetArgs() != sArgs) {
|
||||
CUtils::PrintAction("Reloading Global Module [" + sModName + "]");
|
||||
CUtils::PrintAction("Reloading global module [" + sModName + "]");
|
||||
|
||||
bool bModRet = GetModules().ReloadModule(sModName, sArgs, NULL, NULL, sModRet);
|
||||
|
||||
@@ -1154,7 +1154,7 @@ bool CZNC::DoRehash(CString& sError)
|
||||
if (!sISpoofFormat.empty() || !sISpoofFile.empty()) {
|
||||
CModule *pIdentFileMod = GetModules().FindModule("identfile");
|
||||
if (!pIdentFileMod) {
|
||||
CUtils::PrintAction("Loading Global Module [identfile]");
|
||||
CUtils::PrintAction("Loading global Module [identfile]");
|
||||
|
||||
CString sModRet;
|
||||
bool bModRet = GetModules().LoadModule("identfile", "", CModInfo::GlobalModule, NULL, NULL, sModRet);
|
||||
@@ -1330,7 +1330,7 @@ bool CZNC::DoRehash(CString& sError)
|
||||
|
||||
for (set<CString>::iterator it = ssUnload.begin(); it != ssUnload.end(); ++it) {
|
||||
if (GetModules().UnloadModule(*it))
|
||||
CUtils::PrintMessage("Unloaded Global Module [" + *it + "]");
|
||||
CUtils::PrintMessage("Unloaded global module [" + *it + "]");
|
||||
else
|
||||
CUtils::PrintMessage("Could not unload [" + *it + "]");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user