fixing vavaas mental issues

This commit is contained in:
Kbz-8
2024-02-06 12:38:49 +01:00
parent 160c02fc75
commit 393c73b078
12 changed files with 324 additions and 324 deletions

View File

@@ -23,8 +23,8 @@ static irc::Server* serv_ptr = NULL;
void signalsHandler(int foo)
{
(void)foo;
if (!serv_ptr)
return ;
if(!serv_ptr)
return;
serv_ptr->closeMainSocket();
std::cout << "\b\b \b\b" << std::flush;
irc::logs::report(irc::log_message, "Shutting down...");
@@ -32,17 +32,17 @@ void signalsHandler(int foo)
int main(int ac, char** av)
{
if (ac != 3)
if(ac != 3)
{
irc::logs::report(irc::log_message, "usage './ircserv <port> <password>', try again dumbass");
return 0;
}
if (av[1] == NULL || av[2] == NULL)
if(av[1] == NULL || av[2] == NULL)
irc::logs::report(irc::log_fatal_error, "invalid argv, argv[1] or argv[2] is NULL (wtf)");
char* end;
int port = std::strtol(av[1], &end, 10);
if (errno == ERANGE || *end != 0 || port <= 0 || port > 0xFFFF || std::strlen(av[1]) == 0)
if(errno == ERANGE || *end != 0 || port <= 0 || port > 0xFFFF || std::strlen(av[1]) == 0)
irc::logs::report(irc::log_fatal_error, "invalid port");
irc::Server serv(port, av[2]);