Skip to content

Commit

Permalink
fix: disallow JOIN command to unregistered clients
Browse files Browse the repository at this point in the history
  • Loading branch information
mortebrume committed Sep 2, 2024
1 parent f7c978d commit 25941a1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Commands/JoinCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ void JoinCommand::checkParams(Client* client, std::vector<std::string> params) {
client->sendMessage(Replies::ERR_NEEDMOREPARAMS(client, "JOIN"));
throw ClientException();
}
if (client->getState() < REGISTERED)
throw ClientException();
}

void JoinCommand::parseParams() {
Expand Down

0 comments on commit 25941a1

Please sign in to comment.