-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix register msg #135
fix register msg #135
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
# include <string> | ||
# include <vector> | ||
# include <unistd.h> | ||
# include <ctime> | ||
|
||
# include "Logger.hpp" | ||
|
||
|
@@ -32,6 +33,7 @@ | |
|
||
# define DEFAULT_PORT "6666" | ||
# define DEFAULT_PASS "1234" | ||
# define DEFAULT_SERVER_VERSION "ft_messenger-v1.0.0" | ||
|
||
// ========================================= IRC SERVER ERROR MESSAGES ========================================= | ||
# define INVALID_ARGS "[ERROR] Invalid args.\nUsage: ./ircserv <port> <password>" | ||
|
@@ -62,6 +64,10 @@ | |
// # define RPL_AWAY(nickname, username, hostname, awayMessage) USER_ID(nickname, username, hostname) + " " + (nickname) + " :" + (awayMessage) | ||
// # define RPL_CHANNEL_MODE_IS(nickname, username, hostname, channel, mode, modeParams) USER_ID(nickname, username, hostname) + " " + (channel) + " " + (mode) + " " + (modeParams) | ||
# define RPL_END_OF_NAMES(nickname, usermane, hostname, channel) USER_ID(nickname, username, hostname) + " " + (channel) + " :End of NAMES list." | ||
# define RPL_WELCOME(nickname, username, hostname) std::string("Welcome to the Internet Relay Network ") + USER_ID(nickname, username, hostname) | ||
# define RPL_YOURHOST(servername) "Your host is " + (servername) + ", running version " + (DEFAULT_SERVER_VERSION) | ||
# define RPL_CREATED(date) "This server was create: " + (date) | ||
# define RPL_MYINFO(servername, channelModes) (servername) + " " + (DEFAULT_SERVER_VERSION) + " Available user modes: " + ", Available channel modes: " + (channelModes) | ||
|
||
# define ERROR_MSG(errorCode, nickname, errorMsg) ":irc.ft_messenger.net " + (errorCode) + " " + (nickname) + " " + (errorMsg) + "." | ||
|
||
|
@@ -75,5 +81,6 @@ | |
|
||
std::vector<std::string> split(const std::string &s, char delim); | ||
bool isNumber(const std::string& s); | ||
std::string getCurrentDate(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Si lo pongo da error, según copilot dice que no tiene sentido poner const en una función no miembro, porque no hay objeto para modificar. Este es el error"a type qualifier is not allowed on a nonmember function" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah claro, que es el libUtils. Cuando hagas el singleton añadelo a todas las funciones |
||
|
||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hace falta el std::string??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A mi eso me pesaba con la de los rpl que tengo que hacer. Es necesario porque coge el USER_ID como un string y el mensaje del principio como un const char * o algo así. En mi tarea lo arreglaré
Damos por bueno esto, me traigo los cambios y lo arreglo con el resto