-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic implementation of Join command
- Loading branch information
1 parent
0c841f1
commit e5792b7
Showing
13 changed files
with
346 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#ifndef JOIN_COMMAND_HPP | ||
# define JOIN_COMMAND_HPP | ||
|
||
# include <map> | ||
|
||
# include "ICommand.hpp" | ||
|
||
# include "Server.hpp" | ||
|
||
# include "libsUtils.hpp" | ||
# include "utils.hpp" | ||
|
||
/** | ||
* An ICommand implementation that is responsible for the binding and creation of a channel. | ||
* | ||
*/ | ||
class JoinCommand : public ICommand { | ||
private: | ||
std::map<std::string, std::string> _channels; //key: channelName, value: channelPassword | ||
|
||
public: | ||
JoinCommand(std::string channels, std::string keys); | ||
~JoinCommand(); | ||
|
||
void execute(Server &server, int fd); | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#ifndef JOIN_PARSER_HPP | ||
# define JOIN_PARSER_HPP | ||
|
||
# include "IParser.hpp" | ||
|
||
# include "JoinCommand.hpp" | ||
|
||
# include "libsUtils.hpp" | ||
|
||
/** | ||
* An IParser implementation that is responsible for parsing the JOIN command. | ||
*/ | ||
class JoinParser : public IParser { | ||
public: | ||
ICommand *parse(const std::vector<std::string>& tokens); | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.