/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* join.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: aortigos > args; if (!clients[fd].isRegistered()) { std::string msg = "You are not registered\r\n"; send(fd, msg.c_str(), msg.size(), 0); return ; } if (channels.find(args) == channels.end()) { channels.insert(std::make_pair(args, Channel(args))); channels[args].addMember(fd); std::string msg = "Channel created\r\n"; send(fd, msg.c_str(), msg.size(), 0); } else { channels[args].addMember(fd); std::string msg = "Channel already exists\r\n"; send(fd, msg.c_str(), msg.size(), 0); } }