Closed ClemaX closed 3 years ago
I'll do this. With which client should i test ?
I got this code:
// Need to know where the nickname is parsed/processed
# include <string>
# include <irc/Database.hpp>
/**
* @brief Return an avalaible (not collisioned) client nickname,
* append a '_' for each collision found.
*
* @tparam db A template representing a database that has the
* member: bool_conversible_type get_client(const std::string&)
* @param nickname Reseach key.
* @param database The database where the search will be performed.
*
* @return A valid nickname.
*/
template <typename db>
const std::string& set_nickname(const std::string& nickname, const db& database)
{ return (database.getClient(nickname) ? set_nickname(nickname + "_", database) : nickname); }
But i don't able to find where use it. I don't find where the nick command is implemented. Can u help me with that ?
It should be in the server commands, or maybe it is not implemented yet.
The NICK command (guiding my research by functions and classes names) seem to not be present in the folder src/irc/commands. I going to ask to Brice and implement it too if is not done yet.
DONE
The server should check for nickname collision upon receiving the
NICK
command. CheckERR_NICKCOLLISION
andKILL
.~Freenode~ The irc client adds
_
to the end of the nickname until the collision is resolved. This does not need to be handled server side.