summaryrefslogtreecommitdiff
path: root/src/net/chatserver
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/chatserver')
-rw-r--r--src/net/chatserver/chatserver.cpp14
-rw-r--r--src/net/chatserver/chatserver.h4
2 files changed, 15 insertions, 3 deletions
diff --git a/src/net/chatserver/chatserver.cpp b/src/net/chatserver/chatserver.cpp
index fbf7355f..c6df7c83 100644
--- a/src/net/chatserver/chatserver.cpp
+++ b/src/net/chatserver/chatserver.cpp
@@ -81,11 +81,11 @@ void Net::ChatServer::privMsg(const std::string &recipient,
}
void Net::ChatServer::registerChannel(const std::string &name,
- const std::string &announcement, const std::string &password)
+ const std::string &topic, const std::string &password)
{
MessageOut msg(PCMSG_REGISTER_CHANNEL);
msg.writeString(name);
- msg.writeString(announcement);
+ msg.writeString(topic);
msg.writeString(password);
connection->send(msg);
@@ -125,3 +125,13 @@ void Net::ChatServer::getUserList(const std::string &channel)
connection->send(msg);
}
+
+void Net::ChatServer::setChannelTopic(short channel, const std::string &topic)
+{
+ MessageOut msg(PCMSG_TOPIC_CHANGE);
+
+ msg.writeInt16(channel);
+ msg.writeString(topic);
+
+ connection->send(msg);
+}
diff --git a/src/net/chatserver/chatserver.h b/src/net/chatserver/chatserver.h
index 411d5e7b..dac19e88 100644
--- a/src/net/chatserver/chatserver.h
+++ b/src/net/chatserver/chatserver.h
@@ -43,7 +43,7 @@ namespace Net
void privMsg(const std::string &recipient, const std::string &text);
void registerChannel(const std::string &name,
- const std::string &announcement, const std::string &password);
+ const std::string &topic, const std::string &password);
void enterChannel(const std::string &channel, const std::string &password);
@@ -53,6 +53,8 @@ namespace Net
void getUserList(const std::string &channel);
+ void setChannelTopic(short channel, const std::string &topic);
+
}
}