Removed comment block from userconnection.cpp
This commit is contained in:
parent
10c454e51c
commit
643d917ac1
@ -16,33 +16,6 @@ void UserConnection::process_cmd(std::string cmd_in) {
|
|||||||
IRCCommand cmd = IRCCommand(cmd_in);
|
IRCCommand cmd = IRCCommand(cmd_in);
|
||||||
std::cout << cmd.to_string() << std::endl;
|
std::cout << cmd.to_string() << std::endl;
|
||||||
|
|
||||||
/* if (state == Registered) {
|
|
||||||
user->process_cmd(cmd);
|
|
||||||
delete cmd;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string command = cmd.get_command();
|
|
||||||
|
|
||||||
if (command == "NICK" && cmd.has_parameter()) {
|
|
||||||
user->set_nick(cmd.get_parameter(0));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (command == "USER" && cmd.has_parameter()) {
|
|
||||||
user->set_username(cmd.get_parameter(0));
|
|
||||||
user->set_realname(cmd.get_parameter(3));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (user->has_nick() && user->has_username()) {
|
|
||||||
state = Registered;
|
|
||||||
send(":xnoircd 001 " + user->get_nick() + " :Welcome");
|
|
||||||
send(":xnoircd 002 " + user->get_nick() + " :Welcome");
|
|
||||||
send(":xnoircd 003 " + user->get_nick() + " :Welcome");
|
|
||||||
send(":xnoircd 004 " + user->get_nick() + " xnoircd 0 ABCabc ABCabc");
|
|
||||||
send(":xnoircd 422 " + user->get_nick() + " :No MOTD");
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
for (IRCCommand c : user->process_cmd(cmd))
|
for (IRCCommand c : user->process_cmd(cmd))
|
||||||
send(c.to_string());
|
send(c.to_string());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user