-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
37 lines (33 loc) · 1.32 KB
/
main.cpp
File metadata and controls
37 lines (33 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: shebaz <shebaz@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/06/20 07:45:33 by bimane #+# #+# */
/* Updated: 2025/09/26 20:50:52 by shebaz ### ########.fr */
/* */
/* ************************************************************************** */
#include "includes/irc_o.hpp"
#include "includes/client.hpp"
int end_server = 0;
int main(int ac, char **av)
{
if(ac < 3)
{
std::cerr <<"Erreur:Essayez encore"<<std::endl;
return(1);
}
int port = atoi(av[1]);
if(port <= 0)
{
std::cerr <<"Erreur:invalide port"<<std::endl;
return (1);
}
std::string pass = av[2];
Ircserv srv(port,pass);
handle_signals();
srv.ft_run();
return(0);
}