Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added ircserv
Binary file not shown.
1 change: 0 additions & 1 deletion srcs/server/addNewClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const std::string extractCommandContent(const std::string &buffer, const std::st

int Server::checkIfNewClient(const char *buffer, int client_fd)
{

if (isValidFd(client_fd) == -1)
return (-1);
if (_clients.count(client_fd))
Expand Down
2 changes: 1 addition & 1 deletion srcs/server/commands/nick.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ int Server::checkNickUser(int client_fd, const std::string &nick)
int i = 0;
int j = 0;

while (user[i] != ' ')
while (user[i] && user[i] != ' ')
i++;

const std::string userFirstParam(user.substr(j, i));
Expand Down
2 changes: 1 addition & 1 deletion srcs/server/numericReplies.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# define ERR_CHANNELISFULL(channel) ":localhost 471" + channel + " :Cannot join channel (+l)"
# define RPL_TOPIC(channel, topic) ":localhost 332 " + channel + " :" + topic
# define RPL_NAMREPLY(username, channel, nickname) ":localhost 353 " + username + " " + channel + ":" + "awd awdd ddwa cawca" + "\r\n"
# define ERR_CHANOPRIVSNEEDED(channel) ":localhost 482" + channel + " :You're not channel operator"
# define ERR_CHANOPRIVSNEEDED(nickname, channel) ":localhost/6666 482 " + nickname + " " + channel + " :You're not channel operator"
# define ERR_NICKNAMEINUSE(nickname) ":localhost 433 " + nickname + ":Nickname already in use"

# define RPL_NICK(oldnick, newnick) ":" + oldnick + " NICK " + newnick + "\r\n"
Expand Down
14 changes: 0 additions & 14 deletions srcs/server/numeric_replies.hpp
Original file line number Diff line number Diff line change
@@ -1,14 +0,0 @@

#pragma once

#include "Server.hpp"

//------------------*ERROR-JOIN-----------------------

# define ERR_NEEDMOREPARAMS(command) ":localhost 461 " + command + " :not enough parameters\r\n"
# define ERR_INVITEONLYCHAN(nickname) ":localhost 473 " + nickname + ":Cannot join channel (+i)\r\n"
# define ERR_NOSUCHCHANNEL(nickname) ":localhost " + nickname + "number of params invalid\r\n"
# define ERR_CHANNELISFULL(channel) ":localhost " + channel + " :Cannot join channel (+l)\r\n"
# define RPL_TOPIC(channel, topic) ":localhost 332 " + channel + " :" + topic + "\r\n"
# define RPL_NAMREPLY(username, channel, nickname) ":localhost 353 " + username + " " + channel + ":" + "\r\n"
# define ERR_CHANOPRIVSNEEDED(nickname, channel) ":localhost/6666 482 " + nickname + " " + channel + " :You're not channel operator"