summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-04-05 21:23:32 +0300
committerAndrei Karas <akaras@inbox.ru>2015-04-05 21:23:32 +0300
commitcb847e9e671f6d65f177686ae8544525c8f53763 (patch)
tree4de95fa8fea52c24ce163e804842c4f1ebc0a069
parentbd44e8d0a94dd96e6f8eb0828b4f2b5de902ee83 (diff)
downloadmv-cb847e9e671f6d65f177686ae8544525c8f53763.tar.gz
mv-cb847e9e671f6d65f177686ae8544525c8f53763.tar.bz2
mv-cb847e9e671f6d65f177686ae8544525c8f53763.tar.xz
mv-cb847e9e671f6d65f177686ae8544525c8f53763.zip
eathena: impliment packet SMSG_CHAT_ROOM_ADD_MEMBER.
-rw-r--r--src/net/eathena/chathandler.cpp6
-rw-r--r--src/resources/notifications.h4
-rw-r--r--src/resources/notifytypes.h1
3 files changed, 9 insertions, 2 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index 77e87df71..3038628ab 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -912,9 +912,11 @@ void ChatHandler::processChatRoomJoinFailed(Net::MessageIn &msg)
void ChatHandler::processChatRoomAddMember(Net::MessageIn &msg)
{
- UNIMPLIMENTEDPACKET;
msg.readInt16("users");
- msg.readString(24, "name");
+ const std::string name = msg.readString(24, "name");
+ if (!localChatTab)
+ return;
+ NotifyManager::notify(NotifyTypes::ROOM_JOINED, name);
}
void ChatHandler::processChatRoomSettings(Net::MessageIn &msg)
diff --git a/src/resources/notifications.h b/src/resources/notifications.h
index e6d577633..132409fd0 100644
--- a/src/resources/notifications.h
+++ b/src/resources/notifications.h
@@ -519,6 +519,10 @@ namespace NotifyManager
// TRANSLATORS: notification message
N_("Chat room already exists"),
NotifyFlags::EMPTY},
+ {"chat room joined",
+ // TRANSLATORS: notification message
+ N_("%s joined room."),
+ NotifyFlags::STRING},
};
} // namespace NotifyManager
#endif // RESOURCES_NOTIFICATIONS_H
diff --git a/src/resources/notifytypes.h b/src/resources/notifytypes.h
index 3269192a3..972e694a9 100644
--- a/src/resources/notifytypes.h
+++ b/src/resources/notifytypes.h
@@ -148,6 +148,7 @@ namespace NotifyTypes
MANNER_NEGATIVE_POINTS,
ROOM_LIMIT_EXCEEDED,
ROOM_ALREADY_EXISTS,
+ ROOM_JOINED,
TYPE_END
};