Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: znc/znc
base: ed83ac632dc1
...
head fork: znc/znc
compare: b0a2a5815567
  • 2 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
Commits on Oct 19, 2012
@DarthGandalf DarthGandalf 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.
4f1fd1f
@DarthGandalf DarthGandalf Fix error message at webadmin #239 b0a2a58
View
11 modules/controlpanel.cpp → modules/control.cpp
@@ -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 @@ class CAdminMod : public CModule {
};
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.")
View
4 modules/webadmin.cpp
@@ -817,6 +817,10 @@ class CWebAdminMod : public CModule {
WebSock.PrintErrorPage("Network number limit reached. Ask an admin to increase the limit for you, or delete few old ones from Your Settings");
return true;
}
+ if (!CIRCNetwork::IsValidNetwork(sName)) {
+ WebSock.PrintErrorPage("Network name should be alphanumeric");
+ return true;
+ }
pNetwork = pUser->AddNetwork(sName);
if (!pNetwork) {
WebSock.PrintErrorPage("Network [" + sName.Token(0) + "] already exists");
View
4 src/IRCNetwork.cpp
@@ -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));
}
View
8 src/User.cpp
@@ -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;
View
14 src/znc.cpp
@@ -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 + "]");
}

No commit comments for this range

Something went wrong with that request. Please try again.