+// Client is requesting the room info banner
+void read_room_info_banner(struct http_transaction *h, struct ctdlsession *c) {
+ char buf[1024];
+
+ ctdl_printf(c, "RINF");
+ ctdl_readline(c, buf, sizeof(buf));
+ if (buf[0] == '1') {
+ StrBuf *info = NewStrBuf();
+ while (ctdl_readline(c, buf, sizeof(buf)), (strcmp(buf, "000"))){
+ StrBufAppendPrintf(info, "%s\n", buf);
+ }
+ add_response_header(h, strdup("Content-type"), strdup("text/plain"));
+ h->response_code = 200;
+ h->response_string = strdup("OK");
+ h->response_body_length = StrLength(info);
+ h->response_body = SmashStrBuf(&info);
+ return;
+ }
+ else {
+ do_404(h);
+ }
+}
+
+