make the invited user if it kicked from the channed and the channel is restrected by the +i need to be invited again to join the channel again
This commit is contained in:
15
channel.hpp
15
channel.hpp
@@ -130,7 +130,7 @@ public:
|
||||
}
|
||||
|
||||
|
||||
void ejectUser(int fd) {
|
||||
void ejectUserfromusers(int fd) {
|
||||
// Iterate over the map to find the user with the given file descriptor
|
||||
std::map<std::string, int>::iterator it;
|
||||
for (it = userFdMap.begin(); it != userFdMap.end(); ++it) {
|
||||
@@ -143,6 +143,19 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void ejectUserfromivited(std::string nickname) {
|
||||
// Iterate over the map to find the user with the given file descriptor
|
||||
std::map<std::string, int>::iterator it;
|
||||
for (it = invitedUsers.begin(); it != invitedUsers.end(); ++it) {
|
||||
if (it->first == nickname) {
|
||||
// Erase the user from the map
|
||||
invitedUsers.erase(it);
|
||||
std::cout << "the user earased " << std::endl;
|
||||
return; // Exit the function after removing the user
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::string getOperatorNickname(int fd) const {
|
||||
std::map<std::string, int>::const_iterator it;
|
||||
for (it = operators.begin(); it != operators.end(); ++it) {
|
||||
|
Reference in New Issue
Block a user