mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Make UpdateModule reload the module for every module type
UpdateModule has been moved to CZNC because it doesn't really fit into CUser. The new UpdateModule will reload the module for global modules, user modules and network modules. Fixes #69
This commit is contained in:
@@ -963,17 +963,11 @@ void CClient::UserCommand(CString& sLine) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_pUser->DenyLoadMod() || !m_pUser->IsAdmin()) {
|
||||
PutStatus("Unable to reload [" + sMod + "] Access Denied.");
|
||||
return;
|
||||
}
|
||||
|
||||
PutStatus("Reloading [" + sMod + "] on all users...");
|
||||
if (CUser::UpdateModule(sMod)) {
|
||||
PutStatus("Reloading [" + sMod + "] everywhere");
|
||||
if (CZNC::Get().UpdateModule(sMod)) {
|
||||
PutStatus("Done");
|
||||
} else {
|
||||
PutStatus("Done, but there were errors, some users no longer have ["
|
||||
+ sMod + "] loaded");
|
||||
PutStatus("Done, but there were errors, [" + sMod + "] could not be loaded everywhere.");
|
||||
}
|
||||
} else if ((sCommand.Equals("ADDBINDHOST") || sCommand.Equals("ADDVHOST")) && m_pUser->IsAdmin()) {
|
||||
CString sHost = sLine.Token(1);
|
||||
@@ -1476,7 +1470,7 @@ void CClient::HelpUser() {
|
||||
Table.AddRow();
|
||||
Table.SetCell("Command", "UpdateMod");
|
||||
Table.SetCell("Arguments", "<module>");
|
||||
Table.SetCell("Description", "Reload a module on all users");
|
||||
Table.SetCell("Description", "Reload a module everywhere");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user