yes
This commit is contained in:
23
srcs/core/channel.cpp
Normal file
23
srcs/core/channel.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* channel.cpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/01/21 10:36:21 by maldavid #+# #+# */
|
||||
/* Updated: 2024/01/21 10:36:49 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include <channel.hpp>
|
||||
|
||||
namespace irc
|
||||
{
|
||||
Channel::Channel()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Channel::~Channel() {}
|
||||
}
|
||||
23
srcs/core/client.cpp
Normal file
23
srcs/core/client.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* client.cpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/01/21 10:35:52 by maldavid #+# #+# */
|
||||
/* Updated: 2024/01/21 10:36:20 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include <client.hpp>
|
||||
|
||||
namespace irc
|
||||
{
|
||||
Client::Client()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Client::~Client() {}
|
||||
}
|
||||
@@ -6,11 +6,16 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/01/20 09:27:04 by maldavid #+# #+# */
|
||||
/* Updated: 2024/01/21 09:30:55 by maldavid ### ########.fr */
|
||||
/* Updated: 2024/01/21 10:31:26 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include <logs.hpp>
|
||||
#include <cstdlib>
|
||||
#include <cctype>
|
||||
#include <cstring>
|
||||
#include <cerrno>
|
||||
#include <server.hpp>
|
||||
|
||||
int main(int ac, char** av)
|
||||
{
|
||||
@@ -19,6 +24,15 @@ int main(int ac, char** av)
|
||||
irc::logs::report(irc::log_message, "usage './ircserv <port> <password>', try again dumbass");
|
||||
return 0;
|
||||
}
|
||||
(void)av;
|
||||
|
||||
if(av[1] == NULL || av[2] == NULL)
|
||||
irc::logs::report(irc::log_fatal_error, "invalid argv, one is NULL (wtf)");
|
||||
|
||||
char* end;
|
||||
long port = std::strtol(av[1], &end, 10);
|
||||
if(errno == ERANGE || *end != 0 || port < 0 || port > 0xffff)
|
||||
irc::logs::report(irc::log_fatal_error, "invalid port");
|
||||
|
||||
irc::Server server(port, av[2]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -6,13 +6,23 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/01/21 09:31:17 by maldavid #+# #+# */
|
||||
/* Updated: 2024/01/21 09:31:28 by maldavid ### ########.fr */
|
||||
/* Updated: 2024/01/21 10:38:12 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include <server.hpp>
|
||||
#include <client.hpp>
|
||||
#include <channel.hpp>
|
||||
|
||||
namespace irc
|
||||
{
|
||||
Server::Server(int port, const std::string& password) : _password(password), _port(port)
|
||||
{
|
||||
(void)_port;
|
||||
(void)_password;
|
||||
(void)_socket;
|
||||
(void)_channels;
|
||||
}
|
||||
|
||||
Server::~Server() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user