Skip to content

Commit

Permalink
fixe quit
Browse files Browse the repository at this point in the history
  • Loading branch information
Luthernmr committed Jan 5, 2023
1 parent 1b628cb commit 137c368
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions srcs/commands/Part.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ void Server::part(Client &client)
notice(client, chlName, RPL_PART(client.getNickname(), chlName));
_channelMap[chlName]->eraseClient(client);
if (_channelMap[chlName]->getFdVector().empty())
{
delete(_channelMap[chlName]);
_channelMap.erase(chlName);
}

}
}
else
Expand Down
1 change: 1 addition & 0 deletions srcs/commands/Quit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ void Server::quit(Client &client)
{
if (it->second)
delete(it->second);
_channelMap.erase(it);
break;
}
}
Expand Down

0 comments on commit 137c368

Please sign in to comment.