mirror of
https://github.com/znc/znc.git
synced 2026-05-04 04:22:37 +02:00
Add a Rehash command to /msg *status
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@953 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
13
Client.cpp
13
Client.cpp
@@ -686,6 +686,14 @@ void CClient::UserCommand(const CString& sLine) {
|
||||
if (!SendMotd()) {
|
||||
PutStatus("There is no MOTD set.");
|
||||
}
|
||||
} else if (m_pUser->IsAdmin() && sCommand.CaseCmp("Rehash") == 0) {
|
||||
CString sRet;
|
||||
|
||||
if (CZNC::Get().RehashConfig(sRet)) {
|
||||
PutStatus("Rehashing succeeded!");
|
||||
} else {
|
||||
PutStatus("Rehashing failed: " + sRet);
|
||||
}
|
||||
} else if (m_pUser->IsAdmin() && sCommand.CaseCmp("SaveConfig") == 0) {
|
||||
if (CZNC::Get().WriteConfig()) {
|
||||
PutStatus("Wrote config to [" + CZNC::Get().GetConfigFile() + "]");
|
||||
@@ -1600,6 +1608,11 @@ void CClient::HelpUser() {
|
||||
}
|
||||
|
||||
if (m_pUser->IsAdmin()) {
|
||||
Table.AddRow();
|
||||
Table.SetCell("Command", "Rehash");
|
||||
Table.SetCell("Arguments", "");
|
||||
Table.SetCell("Description", "Reload znc.conf from disk");
|
||||
|
||||
Table.AddRow();
|
||||
Table.SetCell("Command", "SaveConfig");
|
||||
Table.SetCell("Arguments", "");
|
||||
|
||||
Reference in New Issue
Block a user