summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
};