summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-04-05 22:03:51 +0300
committerAndrei Karas <akaras@inbox.ru>2015-04-06 01:56:21 +0300
commit75ddffb8941594a218ec23f86b8c16b5d54b728a (patch)
tree9c0e28efcc32d69fdd57b03d21ce2b9307a7e387 /src
parentb956661094109ae89ea87550cec5a9a6ed9eaa90 (diff)
downloadplus-75ddffb8941594a218ec23f86b8c16b5d54b728a.tar.gz
plus-75ddffb8941594a218ec23f86b8c16b5d54b728a.tar.bz2
plus-75ddffb8941594a218ec23f86b8c16b5d54b728a.tar.xz
plus-75ddffb8941594a218ec23f86b8c16b5d54b728a.zip
eathena: impliment packet SMSG_CHAT_ROOM_ROLE_CHANGE.
Diffstat (limited to 'src')
-rw-r--r--src/net/eathena/chathandler.cpp17
-rw-r--r--src/resources/notifications.h4
-rw-r--r--src/resources/notifytypes.h1
3 files changed, 19 insertions, 3 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index f4dd9c937..6aca795c2 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -959,9 +959,20 @@ void ChatHandler::processChatRoomSettings(Net::MessageIn &msg)
void ChatHandler::processChatRoomRoleChange(Net::MessageIn &msg)
{
- UNIMPLIMENTEDPACKET;
- msg.readInt32("role");
- msg.readString(24, "name");
+ const int role = msg.readInt32("role");
+ const std::string name = msg.readString(24, "name");
+ switch(role)
+ {
+ case 0:
+ NotifyManager::notify(NotifyTypes::ROOM_ROLE_OWNER, name);
+ break;
+ case 1:
+ // dont show normal role
+ break;
+ default:
+ UNIMPLIMENTEDPACKET;
+ break;
+ }
}
void ChatHandler::processMVPItem(Net::MessageIn &msg)
diff --git a/src/resources/notifications.h b/src/resources/notifications.h
index 8249fef28..eb2b520c6 100644
--- a/src/resources/notifications.h
+++ b/src/resources/notifications.h
@@ -531,6 +531,10 @@ namespace NotifyManager
// TRANSLATORS: notification message
N_("%s kicked from room."),
NotifyFlags::STRING},
+ {"chat room role owner",
+ // TRANSLATORS: notification message
+ N_("%s role changed to room owner."),
+ NotifyFlags::STRING},
};
} // namespace NotifyManager
#endif // RESOURCES_NOTIFICATIONS_H
diff --git a/src/resources/notifytypes.h b/src/resources/notifytypes.h
index d8d10b8a3..76c0118cf 100644
--- a/src/resources/notifytypes.h
+++ b/src/resources/notifytypes.h
@@ -151,6 +151,7 @@ namespace NotifyTypes
ROOM_JOINED,
ROOM_LEAVE,
ROOM_KICKED,
+ ROOM_ROLE_OWNER,
TYPE_END
};