X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fijoin.cpp;h=34bd44a9b2cfd885f13569673972b6d8cbd90655;hb=c8f92d97c2cd92a07bbb76b96a67cd089c7e3407;hp=a579848c8321061add6f900862e7eed061ea5e82;hpb=f71e6bf9cb41811f18864f5d4eecb26e29d03f25;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/ijoin.cpp b/src/modules/m_spanningtree/ijoin.cpp index a579848c8..34bd44a9b 100644 --- a/src/modules/m_spanningtree/ijoin.cpp +++ b/src/modules/m_spanningtree/ijoin.cpp @@ -40,18 +40,9 @@ CmdResult CommandIJoin::HandleRemote(RemoteUser* user, std::vector& bool apply_modes; if (params.size() > 1) { - time_t RemoteTS = ConvToInt(params[1]); - if (!RemoteTS) - { - ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Invalid TS in IJOIN: " + params[1]); - return CMD_INVALID; - } - + time_t RemoteTS = ServerCommand::ExtractTS(params[1]); if (RemoteTS < chan->age) - { - ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Attempted to lower TS via IJOIN. Channel=" + params[0] + " RemoteTS=" + params[1] + " LocalTS=" + ConvToStr(chan->age)); - return CMD_INVALID; - } + throw ProtocolException("Attempted to lower TS via IJOIN. LocalTS=" + ConvToStr(chan->age)); apply_modes = ((params.size() > 2) && (RemoteTS == chan->age)); } else @@ -73,10 +64,7 @@ CmdResult CommandResync::HandleServer(TreeServer* server, std::vectorIsLocal()) - { - ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Received RESYNC with a source that is not directly connected: " + server->GetID()); - return CMD_INVALID; - } + throw ProtocolException("RESYNC from a server that is not directly connected"); // Send all known information about the channel server->GetSocket()->SyncChannel(chan);