mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
{unload,reload}mod: Don't get modinfo if the type is defined
This allows us to unload a module if we supply the type and mod info cannot be loaded (such as if the module file has been moved).
This commit is contained in:
@@ -846,14 +846,14 @@ void CClient::UserCommand(CString& sLine) {
|
||||
return;
|
||||
}
|
||||
|
||||
CModInfo ModInfo;
|
||||
CString sRetMsg;
|
||||
if (!CZNC::Get().GetModules().GetModInfo(ModInfo, sMod, sRetMsg)) {
|
||||
PutStatus("Unable to find modinfo [" + sMod + "] [" + sRetMsg + "]");
|
||||
return;
|
||||
}
|
||||
|
||||
if (sType.Equals("default")) {
|
||||
CModInfo ModInfo;
|
||||
CString sRetMsg;
|
||||
if (!CZNC::Get().GetModules().GetModInfo(ModInfo, sMod, sRetMsg)) {
|
||||
PutStatus("Unable to find modinfo [" + sMod + "] [" + sRetMsg + "]");
|
||||
return;
|
||||
}
|
||||
|
||||
eType = ModInfo.GetDefaultType();
|
||||
}
|
||||
|
||||
@@ -915,14 +915,14 @@ void CClient::UserCommand(CString& sLine) {
|
||||
return;
|
||||
}
|
||||
|
||||
CModInfo ModInfo;
|
||||
CString sRetMsg;
|
||||
if (!CZNC::Get().GetModules().GetModInfo(ModInfo, sMod, sRetMsg)) {
|
||||
PutStatus("Unable to find modinfo for [" + sMod + "] [" + sRetMsg + "]");
|
||||
return;
|
||||
}
|
||||
|
||||
if (sType.Equals("default")) {
|
||||
CModInfo ModInfo;
|
||||
CString sRetMsg;
|
||||
if (!CZNC::Get().GetModules().GetModInfo(ModInfo, sMod, sRetMsg)) {
|
||||
PutStatus("Unable to find modinfo for [" + sMod + "] [" + sRetMsg + "]");
|
||||
return;
|
||||
}
|
||||
|
||||
eType = ModInfo.GetDefaultType();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user