diff options
author | Roderic Morris <roderic@ccs.neu.edu> | 2008-06-10 00:47:40 +0000 |
---|---|---|
committer | Roderic Morris <roderic@ccs.neu.edu> | 2008-06-10 00:47:40 +0000 |
commit | 6aabeb561db6cdda61a9dff00fd75e9c0efffc23 (patch) | |
tree | 577db9c083f280814a551a67b976bc4ccc40a700 /src | |
parent | af045b4818333b4360f14981c695817c4c8adb21 (diff) | |
download | manaserv-6aabeb561db6cdda61a9dff00fd75e9c0efffc23.tar.gz manaserv-6aabeb561db6cdda61a9dff00fd75e9c0efffc23.tar.bz2 manaserv-6aabeb561db6cdda61a9dff00fd75e9c0efffc23.tar.xz manaserv-6aabeb561db6cdda61a9dff00fd75e9c0efffc23.zip |
fix for listing and quitting channels
Diffstat (limited to 'src')
-rw-r--r-- | src/chat-server/chatchannelmanager.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/chat-server/chatchannelmanager.cpp b/src/chat-server/chatchannelmanager.cpp index e9ba7708..7a98f2cb 100644 --- a/src/chat-server/chatchannelmanager.cpp +++ b/src/chat-server/chatchannelmanager.cpp @@ -28,6 +28,7 @@ #include "defines.h" #include "account-server/dalstorage.hpp" #include "chat-server/chatclient.hpp" +#include "chat-server/chathandler.hpp" ChatChannelManager::ChatChannelManager() : mNextChannelId(1) { @@ -74,7 +75,7 @@ std::list<const ChatChannel*> ChatChannelManager::getPublicChannels() i_end = mChatChannels.end(); i != i_end; ++i) { - if (!i->second.canJoin()) + if (i->second.canJoin()) { channels.push_back(&i->second); } @@ -123,7 +124,10 @@ void ChatChannelManager::removeUserFromAllChannels(ChatClient *user) for (std::vector<ChatChannel *>::const_reverse_iterator i = channels.rbegin(), i_end = channels.rend(); i != i_end; ++i) { - (*i)->removeUser(user); + chatHandler->warnUsersAboutPlayerEventInChat((*i), + user->characterName, + CHAT_EVENT_LEAVING_PLAYER); + (*i)->removeUser(user); } } |