최종본

This commit is contained in:
2025-05-10 19:44:45 +09:00
parent be6417cd40
commit 8b486008fa
2 changed files with 14 additions and 8 deletions

View File

@@ -400,11 +400,11 @@ void ClientManager::run() {
std::cout << "Commads:" << std::endl;
std::cout << "/w <username> : Send direct message to specified user" << std::endl;
std::cout << "/join <roomname> : Enter specified room" << std::endl;
std::cout << "/leave : Exit current room" << std::endl;
std::cout << "/exit : Exit current room" << std::endl;
std::cout << "/create <roomname> : Create room" << std::endl;
std::cout << "/userlist : Print all registred users" << std::endl;
std::cout << "/roomlist : Print all registred rooms" << std::endl;
std::cout << "/exit : Terminate this program" << std::endl;
std::cout << "/quit : Terminate this program" << std::endl;
while (true) {
std::string input;
@@ -453,7 +453,7 @@ void ClientManager::run() {
}
joinRoom(myID_, findRoomId_[roomName]);
}
else if (tokens[0] == "/leave") {
else if (tokens[0] == "/exit") {
if (!inRoom_) {
resourceMutex_.lock();
messageQueue_.push("You are not in any room");
@@ -470,7 +470,7 @@ void ClientManager::run() {
getUserList();
else if (tokens[0] == "/roomlist")
getRoomList();
else if (tokens[0] == "/exit") {
else if (tokens[0] == "/quit") {
break;
}
else if (inRoom_) {