summaryrefslogtreecommitdiff
path: root/src/net/eathena/chathandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-04-05 15:34:11 +0300
committerAndrei Karas <akaras@inbox.ru>2015-04-05 16:25:18 +0300
commit08d5f2d6f3eeded6d7a2e1adcf94e850098aa85f (patch)
tree7cd9be72ab884387173b2aaaa6421ebba7be1ed4 /src/net/eathena/chathandler.cpp
parent05a196194b8270c1ae2e63f8ae31f8a492022388 (diff)
downloadplus-08d5f2d6f3eeded6d7a2e1adcf94e850098aa85f.tar.gz
plus-08d5f2d6f3eeded6d7a2e1adcf94e850098aa85f.tar.bz2
plus-08d5f2d6f3eeded6d7a2e1adcf94e850098aa85f.tar.xz
plus-08d5f2d6f3eeded6d7a2e1adcf94e850098aa85f.zip
On room creation show room name in general tab caption.
Not allow move if in room.
Diffstat (limited to 'src/net/eathena/chathandler.cpp')
-rw-r--r--src/net/eathena/chathandler.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index 1dfeb7ccb..eb7dfe375 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -26,6 +26,7 @@
#include "notifymanager.h"
#include "being/localplayer.h"
+#include "being/playerinfo.h"
#include "being/playerrelations.h"
#include "gui/chatconsts.h"
@@ -852,8 +853,19 @@ void ChatHandler::processChatRoomCreateAck(Net::MessageIn &msg)
switch(result)
{
case 0:
- chatWindow->addChatRoomTab(mChatRoom, true);
+ {
+ PlayerInfo::setRoomName(mChatRoom);
+ chatWindow->joinRoom(true);
+ ChatObject *const obj = new ChatObject;
+ obj->ownerId = localPlayer->getId();
+ obj->chatId = 0;
+ obj->maxUsers = 1000;
+ obj->currentUsers = 1;
+ obj->type = 1;
+ obj->title = mChatRoom;
+ localPlayer->setChat(obj);
break;
+ }
case 1:
NotifyManager::notify(NotifyTypes::ROOM_LIMIT_EXCEEDED);
break;
@@ -864,6 +876,7 @@ void ChatHandler::processChatRoomCreateAck(Net::MessageIn &msg)
UNIMPLIMENTEDPACKET;
break;
}
+ mChatRoom.clear();
}
void ChatHandler::processChatRoomDestroy(Net::MessageIn &msg)