summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_spanningtree/fjoin.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/modules/m_spanningtree/fjoin.cpp b/src/modules/m_spanningtree/fjoin.cpp
index 8846b2fbc..7b4fa06bd 100644
--- a/src/modules/m_spanningtree/fjoin.cpp
+++ b/src/modules/m_spanningtree/fjoin.cpp
@@ -134,11 +134,13 @@ CmdResult CommandFJoin::Handle(const std::vector<std::string>& params, User *src
while ((*unparsedmodes) && (*unparsedmodes != ','))
{
ModeHandler *mh = ServerInstance->Modes->FindMode(*unparsedmodes, MODETYPE_CHANNEL);
- if (mh)
- modes += *unparsedmodes;
- else
+ if (!mh)
+ {
+ ServerInstance->Logs->Log("m_spanningtree", SPARSE, "Unrecognised mode %c, dropping link", *unparsedmodes);
return CMD_INVALID;
+ }
+ modes += *unparsedmodes;
usr++;
unparsedmodes++;
}