feat(cmd/parsing): the parsing is now over
This commit is contained in:
parent
1825a45478
commit
b9ec94f3ee
1 changed files with 38 additions and 28 deletions
|
|
@ -6,18 +6,25 @@
|
||||||
/* By: sben-tay <sben-tay@student.42.fr> +#+ +:+ +#+ */
|
/* By: sben-tay <sben-tay@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/05/24 16:11:56 by rparodi #+# #+# */
|
/* Created: 2025/05/24 16:11:56 by rparodi #+# #+# */
|
||||||
/* Updated: 2025/06/09 14:06:14 by rparodi ### ########.fr */
|
/* Updated: 2025/06/10 16:25:02 by rparodi ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
#include "commands.hpp"
|
#include "commands.hpp"
|
||||||
#include "logs.hpp"
|
|
||||||
#include "pass.hpp"
|
|
||||||
#include "ping.hpp"
|
|
||||||
#include "nick.hpp"
|
|
||||||
#include "userCmd.hpp"
|
|
||||||
#include "cap.hpp"
|
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
|
#include "join.hpp"
|
||||||
|
#include "privmsg.hpp"
|
||||||
|
#include "nick.hpp"
|
||||||
|
#include "invite.hpp"
|
||||||
|
#include "list.hpp"
|
||||||
|
#include "cap.hpp"
|
||||||
|
#include "modes.hpp"
|
||||||
|
#include "ping.hpp"
|
||||||
|
#include "notice.hpp"
|
||||||
|
#include "kick.hpp"
|
||||||
|
#include "userCmd.hpp"
|
||||||
|
#include "pass.hpp"
|
||||||
|
#include "part.hpp"
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -78,47 +85,50 @@ void cmd::dispatch(::User *user, Channel *channel, Server *server, std::string &
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
// if (command_name == "invite") {
|
if (command_name == "invite") {
|
||||||
// Invite(user, channel, server, line).execute();
|
Invite(user, channel, server, line).execute();
|
||||||
// }
|
}
|
||||||
break;
|
break;
|
||||||
case 'j':
|
case 'j':
|
||||||
// if (command_name == "join") {
|
if (command_name == "join") {
|
||||||
// Join(user, channel, server, line).execute();
|
Join(user, channel, server, line).execute();
|
||||||
// }
|
}
|
||||||
break;
|
break;
|
||||||
case 'k':
|
case 'k':
|
||||||
// if (command_name == "kick") {
|
if (command_name == "kick") {
|
||||||
// Kick(user, channel, server, line).execute();
|
Kick(user, channel, server, line).execute();
|
||||||
// }
|
}
|
||||||
break;
|
break;
|
||||||
case 'l':
|
case 'l':
|
||||||
// if (command_name == "list") {
|
if (command_name == "list") {
|
||||||
// List(user, channel, server, line).execute();
|
List(user, channel, server, line).execute();
|
||||||
// }
|
}
|
||||||
break;
|
break;
|
||||||
case 'm':
|
case 'm':
|
||||||
// if (command_name == "mode") {
|
if (command_name == "mode") {
|
||||||
// Mode(user, channel, server, line).execute();
|
Mode(user, channel, server, line).execute();
|
||||||
// }
|
}
|
||||||
break;
|
break;
|
||||||
case 'n':
|
case 'n':
|
||||||
if (command_name == "NICK") {
|
if (command_name == "NICK") {
|
||||||
Nick(user, channel, server, line).execute();
|
Nick(user, channel, server, line).execute();
|
||||||
// } else if (command_name == "notice") {
|
} else if (command_name == "notice") {
|
||||||
// Notice(user, channel, server, line).execute();
|
Notice(user, channel, server, line).execute();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
if (command_name == "pass") {
|
if (command_name == "pass") {
|
||||||
Pass(user, channel, server, line).execute();
|
Pass(user, channel, server, line).execute();
|
||||||
}
|
}
|
||||||
|
if (command_name == "privmsg") {
|
||||||
|
Ping(user, channel, server, line).execute();
|
||||||
|
}
|
||||||
if (command_name == "ping") {
|
if (command_name == "ping") {
|
||||||
Ping(user, channel, server, line).execute();
|
Ping(user, channel, server, line).execute();
|
||||||
}
|
}
|
||||||
// if (command_name == "part") {
|
if (command_name == "part") {
|
||||||
// Part(user, channel, server, line).execute();
|
Part(user, channel, server, line).execute();
|
||||||
// }
|
}
|
||||||
break;
|
break;
|
||||||
case 'u':
|
case 'u':
|
||||||
if (command_name == "user") {
|
if (command_name == "user") {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue