summaryrefslogtreecommitdiffstats
path: root/src/chat-server/chatchannel.cpp
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2008-04-01 17:10:01 +0000
committerDavid Athay <ko2fan@gmail.com>2008-04-01 17:10:01 +0000
commit7d05004c8264eeee8aa1e9a5f0bc6a1126bc793a (patch)
tree15c075dd93f7099ad5e1e791f68f38aad758082d /src/chat-server/chatchannel.cpp
parent7e9bb1451b05480f30be2edfd0b19e7b1e487932 (diff)
downloadmanaserv-7d05004c8264eeee8aa1e9a5f0bc6a1126bc793a.tar.gz
manaserv-7d05004c8264eeee8aa1e9a5f0bc6a1126bc793a.tar.xz
manaserv-7d05004c8264eeee8aa1e9a5f0bc6a1126bc793a.zip
Consolidated public and private channels into one,
which also includes guild channels. Channels now have a joinable field, which is true for channels that are created by users, and false for guild channels. Chatting in guild channels now works, and non-guild members can no longer join guild channels
Diffstat (limited to 'src/chat-server/chatchannel.cpp')
-rw-r--r--src/chat-server/chatchannel.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/chat-server/chatchannel.cpp b/src/chat-server/chatchannel.cpp
index 87c2a17..96de733 100644
--- a/src/chat-server/chatchannel.cpp
+++ b/src/chat-server/chatchannel.cpp
@@ -29,11 +29,13 @@
ChatChannel::ChatChannel(int id,
const std::string &name,
const std::string &announcement,
- const std::string &password):
+ const std::string &password,
+ bool joinable):
mId(id),
mName(name),
mAnnouncement(announcement),
- mPassword(password)
+ mPassword(password),
+ mJoinable(joinable)
{
}
@@ -69,3 +71,8 @@ void ChatChannel::removeAllUsers()
}
mRegisteredUsers.clear();
}
+
+bool ChatChannel::canJoin() const
+{
+ return mJoinable;
+}