diff options
author | Sadie Powell <sadie@witchery.services> | 2020-04-09 14:46:04 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2020-04-09 14:46:04 +0100 |
commit | 52a433cfccad8559ff7d12f7ea308d8f4570444f (patch) | |
tree | a07a37afd65e37c0c1038c53e626b6d48e288dec /src | |
parent | 79650e86fd52979a671df40c33843f77b33ab3a4 (diff) |
Allow <passforward:forwardmsg> to be optional.
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_passforward.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
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); } }; |