Instructions Jenkins Doxygen

(unstable) [added] general chat is now auto-joined upon connect. 92/2192/1
authordannuic <dannuic@swgemu.com>
Wed, 30 Jul 2014 17:32:28 +0000 (11:32 -0600)
committerdannuic <dannuic@swgemu.com>
Wed, 30 Jul 2014 17:32:28 +0000 (11:32 -0600)
Change-Id: I6e5f11c4ba2463f84f0b59503f603d1e357e9188

MMOCoreORB/src/server/chat/ChatManager.idl
MMOCoreORB/src/server/chat/ChatManagerImplementation.cpp
MMOCoreORB/src/server/zone/packets/zone/SelectCharacterCallback.h

index be3b26b..9921af6 100644 (file)
@@ -86,6 +86,7 @@ class ChatManager extends ManagedService implements Logger {
        ChatRoom guildRoom;
        ChatRoom core3Room;
        ChatRoom auctionRoom;
+       ChatRoom generalRoom;
        
        transient ChatRoomMap roomMap;
 
@@ -251,4 +252,11 @@ class ChatManager extends ManagedService implements Logger {
        public ChatRoom getAuctionRoom() {
                return auctionRoom;
        }
+       
+       /***
+        * Returns the general chat room
+        */
+       public ChatRoom getGeneralRoom() {
+               return generalRoom;
+       }
 }
index 17ce391..f6a5467 100644 (file)
@@ -99,7 +99,7 @@ void ChatManagerImplementation::initiateRooms() {
        auctionRoom = createRoom("Auction", core3Room);
        core3Room->addSubRoom(auctionRoom);
 
-       ChatRoom* generalRoom = createRoom("general", core3Room);
+       generalRoom = createRoom("general", core3Room);
        core3Room->addSubRoom(generalRoom);
 
 
@@ -282,14 +282,14 @@ void ChatManagerImplementation::handleChatRoomMessage(CreatureObject* sender, co
        else
                msg = new ChatRoomMessage(fullName, formattedMessage, roomID);
 
-       // Auction Chat and Planet Chat should adhere to player ignore list
-       if( auctionRoom != NULL && auctionRoom->getRoomID() == roomID ){
+       // Auction Chat, General Chat, and Planet Chat should adhere to player ignore list
+       if( auctionRoom != NULL && auctionRoom->getRoomID() == roomID ) {
                channel->broadcastMessageCheckIgnore(msg, name);
-       }
-       else if( planetRoom != NULL && planetRoom->getRoomID() == roomID ){
+       } else if (generalRoom != NULL && generalRoom->getRoomID() == roomID) {
                channel->broadcastMessageCheckIgnore(msg, name);
-       }
-       else{
+       } else if( planetRoom != NULL && planetRoom->getRoomID() == roomID ) {
+               channel->broadcastMessageCheckIgnore(msg, name);
+       } else {
                channel->broadcastMessage(msg);
        }
 
index b3a849e..b4757f0 100644 (file)
@@ -176,6 +176,13 @@ public:
                                auctionChat->addPlayer(player);
                        }
 
+                       // Join General chat room
+                       ManagedReference<ChatRoom*> generalChat = chatManager->getGeneralRoom();
+                       if (generalChat != NULL) {
+                               generalChat->sendTo(player);
+                               generalChat->addPlayer(player);
+                       }
+
                        ghost->notifyOnline();
 
                        PlayerManager* playerManager = zoneServer->getPlayerManager();