GROS CACA COOOOOOOOOOOOOOOOOOOOOOOULLANT
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* ::: :::::::: */
|
/* ::: :::::::: */
|
||||||
/* Bot.cpp :+: :+: :+: */
|
/* bot.cpp :+: :+: :+: */
|
||||||
/* +:+ +:+ +:+ */
|
/* +:+ +:+ +:+ */
|
||||||
/* By: vvaas <vvaas@student.42angouleme.fr> +#+ +:+ +#+ */
|
/* By: vvaas <vvaas@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/01/30 01:54:56 by vvaas #+# #+# */
|
/* 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()
|
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("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);
|
_fd = socket(AF_INET, SOCK_STREAM, 0);
|
||||||
if (_fd == -1)
|
if (_fd == -1)
|
||||||
irc::logs::report(irc::log_fatal_error, "FD error");
|
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_port = htons(PORT);
|
||||||
_serv_addr.sin_addr.s_addr = inet_addr(IP);
|
_serv_addr.sin_addr.s_addr = inet_addr(IP);
|
||||||
if (connect(_fd, (struct sockaddr*)&_serv_addr, sizeof(_serv_addr)) < 0)
|
if (connect(_fd, (struct sockaddr*)&_serv_addr, sizeof(_serv_addr)) < 0)
|
||||||
{
|
|
||||||
irc::logs::report(irc::log_fatal_error, "connect error");
|
irc::logs::report(irc::log_fatal_error, "connect error");
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void bot::connect_to_server()
|
void bot::connect_to_server()
|
||||||
|
|||||||
Reference in New Issue
Block a user