/* * A template has been requested */ void url_do_template(void) { const StrBuf *MimeType; const StrBuf *Tmpl = sbstr("template"); begin_burst(); MimeType = DoTemplate(SKEY(Tmpl), NULL, &NoCtx); http_transmit_thing(ChrPtr(MimeType), 0); }
// display the picture (icon, photo, whatever) associated with the current room void display_roompic(void) { off_t bytes; StrBuf *Buf = NewStrBuf(); serv_printf("DLRI"); StrBuf_ServGetln(Buf); if (GetServerStatus(Buf, NULL) == 6) { StrBufCutLeft(Buf, 4); bytes = StrBufExtract_long(Buf, 0, '|'); StrBuf *content_type = NewStrBuf(); StrBufExtract_token(content_type, Buf, 3, '|'); WC->WBuf = NewStrBuf(); StrBuf_ServGetBLOBBuffered(WC->WBuf, bytes); http_transmit_thing(ChrPtr(content_type), 0); FreeStrBuf(&content_type); } else { output_error_pic("", ""); } FreeStrBuf(&Buf); }