summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2020-04-09 14:46:04 +0100
committerSadie Powell <sadie@witchery.services>2020-04-09 14:46:04 +0100
commit52a433cfccad8559ff7d12f7ea308d8f4570444f (patch)
treea07a37afd65e37c0c1038c53e626b6d48e288dec /src
parent79650e86fd52979a671df40c33843f77b33ab3a4 (diff)
Allow <passforward:forwardmsg> to be optional.
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_passforward.cpp11
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);
}
};