summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}
};