Merging the update — ft_irc v1.4.1
Patch Notes — ft_irc v1.4.1
This commit is contained in:
commit
5362c933c2
2 changed files with 6 additions and 5 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: sben-tay <sben-tay@student.42.fr> +#+ +:+ +#+ */
|
/* By: sben-tay <sben-tay@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/05/24 17:29:48 by rparodi #+# #+# */
|
/* Created: 2025/05/24 17:29:48 by rparodi #+# #+# */
|
||||||
/* Updated: 2025/06/19 14:02:08 by rparodi ### ########.fr */
|
/* Updated: 2025/06/23 12:52:33 by rparodi ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -62,7 +62,7 @@ void Mode::checkMode() {
|
||||||
default :
|
default :
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ((this->_mode.back().first == CHAN_SET_KEY || this->_mode.back().first == CHAN_SET_LIMIT || this->_mode.back().first == CHAN_SET_OP) && argIndex < _args.size())
|
if ((tmp == CHAN_SET_KEY || tmp == CHAN_SET_LIMIT || tmp == CHAN_SET_OP) && argIndex < _args.size())
|
||||||
m.arguments = _args[argIndex++];
|
m.arguments = _args[argIndex++];
|
||||||
this->_mode.push_back(std::make_pair(tmp, m));
|
this->_mode.push_back(std::make_pair(tmp, m));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,12 @@
|
||||||
/* By: sben-tay <sben-tay@student.42.fr> +#+ +:+ +#+ */
|
/* By: sben-tay <sben-tay@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/05/13 11:25:04 by rparodi #+# #+# */
|
/* Created: 2025/05/13 11:25:04 by rparodi #+# #+# */
|
||||||
/* Updated: 2025/06/21 18:49:43 by sben-tay ### ########.fr */
|
/* Updated: 2025/06/23 12:44:32 by rparodi ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
#include "core.hpp"
|
#include "core.hpp"
|
||||||
|
#include "logs.hpp"
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
@ -28,7 +29,7 @@ unsigned short int valid_port(char *input)
|
||||||
for (size_t i = 0; input[i]; i++) {
|
for (size_t i = 0; input[i]; i++) {
|
||||||
if (!isdigit(input[i])) {
|
if (!isdigit(input[i])) {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
std::cerr << LOG << CLR_RED << "Error: Not only number in port: " << input << std::endl;
|
ERROR_MSG("Not only number in port: " << input);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -36,7 +37,7 @@ unsigned short int valid_port(char *input)
|
||||||
int port = strtol(input, NULL, 10);
|
int port = strtol(input, NULL, 10);
|
||||||
if (errno == ERANGE) {
|
if (errno == ERANGE) {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
std::cerr << LOG << CLR_RED << "Error: Port out of range: " << input << std::endl;
|
ERROR_MSG("Port out of range" << input);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
if (port < 1 || port > 65535)
|
if (port < 1 || port > 65535)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue