jss trop beau srx

This commit is contained in:
2024-01-26 02:32:56 +01:00
parent b07f2a7a22
commit a8d7148d39
6 changed files with 55 additions and 21 deletions

View File

@@ -6,7 +6,7 @@
/* By: vvaas <vvaas@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/21 10:35:52 by maldavid #+# #+# */
/* Updated: 2024/01/25 21:55:52 by maldavid ### ########.fr */
/* Updated: 2024/01/26 02:26:04 by vvaas ### ########.fr */
/* */
/******************************************************************************/
@@ -28,7 +28,17 @@ namespace irc
void Client::sendCode(const std::string& code, const std::string& msg)
{
const std::string command = code + " : " + msg + "\r";
const std::string command = ":yipirc " + code + " " + getNickName() + " :" + msg + "\r\n";
#ifdef DEBUG
logs::report(log_message, "sending '%s'", command.c_str());
#endif
if(send(_fd, command.c_str(), command.size(), 0) != static_cast<ssize_t>(command.length()))
logs::report(log_error, "server failed to send a code to '%s' (:sadge:)", _username.c_str());
}
void Client::sendCode(const std::string& code, const std::string& msg0, const std::string& msg1)
{
const std::string command = code + " " + msg0 + " :" + msg1 + "\r\n";
#ifdef DEBUG
logs::report(log_message, "sending '%s'", command.c_str());
#endif