mirror of
https://github.com/znc/znc.git
synced 2026-05-01 11:02:27 +02:00
Added try/catch for LoadModule
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@484 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -810,7 +810,14 @@ void CUserSock::UserCommand(const CString& sLine) {
|
||||
}
|
||||
|
||||
CString sModRet;
|
||||
m_pUser->GetModules().LoadModule(sMod, sArgs, m_pUser, sModRet);
|
||||
|
||||
try {
|
||||
m_pUser->GetModules().LoadModule(sMod, sArgs, m_pUser, sModRet);
|
||||
} catch (CException e) {
|
||||
PutStatus("Unable to load module [" + sMod + "] [" + sModRet + "]");
|
||||
return;
|
||||
}
|
||||
|
||||
PutStatus(sModRet);
|
||||
#else
|
||||
PutStatus("Unable to load [" + sMod + "] Modules are not enabled.");
|
||||
|
||||
Reference in New Issue
Block a user