From 0ff25fc532f7d3a3f66598ff70b09905eb6e4ddc Mon Sep 17 00:00:00 2001 From: cflakes Date: Mon, 8 Feb 2010 22:55:26 +0000 Subject: [PATCH] Reloadmod command: Moved check for empty module name argument to a place where it actually works. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1749 726aef4b-f618-498e-8847-2d620e286838 --- ClientCommand.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ClientCommand.cpp b/ClientCommand.cpp index e2b04d98..980174a9 100644 --- a/ClientCommand.cpp +++ b/ClientCommand.cpp @@ -716,9 +716,15 @@ void CClient::UserCommand(CString& sLine) { sArgs = sLine.Token(2, true); if (m_pUser->DenyLoadMod()) { - PutStatus("Unable to reload [" + sMod + "] Access Denied."); + PutStatus("Unable to reload modules. Access Denied."); return; } + + if (sMod.empty()) { + PutStatus("Usage: ReloadMod [args]"); + return; + } + #ifdef _MODULES CModInfo ModInfo; CString sRetMsg; @@ -734,11 +740,6 @@ void CClient::UserCommand(CString& sLine) { return; } - if (sMod.empty()) { - PutStatus("Usage: ReloadMod [args]"); - return; - } - CString sModRet; if (bGlobal) {