GROS CACA COOOOOOOOOOOOOOOOOOOOOOOULLANT

This commit is contained in:
2024-01-30 02:42:20 +01:00
parent b5b439bff3
commit 8524cbae30
2 changed files with 4 additions and 7 deletions

BIN
greg Executable file

Binary file not shown.

View File

@@ -1,12 +1,12 @@
/******************************************************************************/
/* */
/* ::: :::::::: */
/* Bot.cpp :+: :+: :+: */
/* bot.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: vvaas <vvaas@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/30 01:54:56 by vvaas #+# #+# */
/* Updated: 2024/01/30 02:40:17 by vvaas ### ########.fr */
/* Updated: 2024/01/30 02:41:49 by vvaas ### ########.fr */
/* */
/******************************************************************************/
@@ -22,9 +22,9 @@ bot::~bot() {}
void bot::init()
{
_connect_commands.push_back("USER greg_bot 0 * :botrealname\r\n");
_connect_commands.push_back("NICK greg\r\n");
_connect_commands.push_back("PASS " PASSWORD "\r\n");
_connect_commands.push_back("NICK greg\r\n");
_connect_commands.push_back("USER greg_bot 0 * :botrealname\r\n");
_fd = socket(AF_INET, SOCK_STREAM, 0);
if (_fd == -1)
irc::logs::report(irc::log_fatal_error, "FD error");
@@ -32,10 +32,7 @@ void bot::init()
_serv_addr.sin_port = htons(PORT);
_serv_addr.sin_addr.s_addr = inet_addr(IP);
if (connect(_fd, (struct sockaddr*)&_serv_addr, sizeof(_serv_addr)) < 0)
{
irc::logs::report(irc::log_fatal_error, "connect error");
}
}
void bot::connect_to_server()