From 52a433cfccad8559ff7d12f7ea308d8f4570444f Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 9 Apr 2020 14:46:04 +0100 Subject: Allow to be optional. --- src/modules/m_passforward.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_passforward.cpp b/src/modules/m_passforward.cpp index 026169270..40d04de67 100644 --- a/src/modules/m_passforward.cpp +++ b/src/modules/m_passforward.cpp @@ -105,11 +105,14 @@ class ModulePassForward : public Module } std::string tmp; - FormatStr(tmp, forwardmsg, user); - ServerInstance->Parser.ProcessBuffer(user, tmp); + if (!forwardmsg.empty()) + { + FormatStr(tmp, forwardmsg, user); + ServerInstance->Parser.ProcessBuffer(user, tmp); + tmp.clear(); + } - tmp.clear(); - FormatStr(tmp,forwardcmd, user); + FormatStr(tmp, forwardcmd, user); ServerInstance->Parser.ProcessBuffer(user, tmp); } }; -- cgit v1.2.3