summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-09-23 10:27:40 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-09-23 10:27:40 +0000
commit6667a394a60e85f8bc34eb88c83350f4c28e9d34 (patch)
treef8e7cc6da88f08783c111ffcaf3e87caba5e4974
parentac5375e554e882e0b56eeed9b6e51c06c8d37656 (diff)
downloadmanaserv-6667a394a60e85f8bc34eb88c83350f4c28e9d34.tar.gz
manaserv-6667a394a60e85f8bc34eb88c83350f4c28e9d34.tar.xz
manaserv-6667a394a60e85f8bc34eb88c83350f4c28e9d34.zip
Added comments about weak algorithm for channel creation.
-rw-r--r--src/chat-server/chatchannelmanager.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/chat-server/chatchannelmanager.cpp b/src/chat-server/chatchannelmanager.cpp
index ca2be7f..fe4a48d 100644
--- a/src/chat-server/chatchannelmanager.cpp
+++ b/src/chat-server/chatchannelmanager.cpp
@@ -46,6 +46,9 @@ ChatChannelManager::registerPublicChannel(const std::string &channelName,
const std::string &channelAnnouncement,
const std::string &channelPassword)
{
+ /* FIXME: This code is ill-designed. If the highest ID is already in use,
+ then it is impossible to create new channels, even if there are some
+ unused IDs. */
int channelId = 1;
for (ChatChannelIterator i = mChatChannels.begin(),
end = mChatChannels.end(); i != end; ++i)
@@ -81,6 +84,7 @@ ChatChannelManager::registerPrivateChannel(const std::string &channelName,
const std::string &channelAnnouncement,
const std::string &channelPassword)
{
+ // FIXME: see above.
int channelId = MAX_PUBLIC_CHANNELS_RANGE;
for (ChatChannelIterator i = mChatChannels.begin(),