renagc / 42_ft_irc

0 stars 0 forks source link

fix-SERVER #10

Open renagc opened 4 months ago

renagc commented 4 months ago

Sometimes server goes off with basic_string::_M_replace, dont know where!

renagc commented 4 months ago

FOUND!!!

solved with quit command:

void Parser::quitCommand( Client client, const std::string &message ) { std::map<std::string, Channel>::iterator it = _channels->begin(); for (; it != _channels->end(); it++) { Channel channel = &it->second; if (channel->findClient(client)) Response::RPL_QUIT(client, channel, &message[1]); } Response::message(client, "QUIT " + message + "\r\n"); _server->clientDisconnect(client); }