{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:
Kyle Fuller
2012-02-14 11:48:46 +00:00
parent e08d53dcd5
commit ec1202daf3

View File

@@ -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();
}