From 20eaf1a276fcf4dab6c144ed9486d7def01217fd Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Wed, 18 Apr 2012 16:06:58 +0200 Subject: Log mode errors when processing FJOIN. --- src/modules/m_spanningtree/fjoin.cpp | 8 +++++--- 1 file 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& 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++; } -- cgit v1.2.3