mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 13:45:10 +00:00
[MOD/FIX] Set history limit, change logo, CI
This commit is contained in:
parent
42f02010d4
commit
696def187c
5 changed files with 25 additions and 10 deletions
|
|
@ -14,7 +14,7 @@ char *
|
|||
ASUpload(const ParseeConfig *c, Stream *from, unsigned int size, char *mime)
|
||||
{
|
||||
char *size_str, *path, *ret, *user;
|
||||
int i;
|
||||
unsigned int i;
|
||||
HttpClientContext *ctx;
|
||||
HashMap *reply;
|
||||
if (!c || !from)
|
||||
|
|
|
|||
|
|
@ -4,11 +4,10 @@
|
|||
|
||||
const char *parsee_ascii[PARSEE_ASCII_LINES] =
|
||||
{
|
||||
"----------------------------",
|
||||
" =+======",
|
||||
" || | _ _/__----",
|
||||
" / || \\ ==+= _/_____\\_",
|
||||
" | || | -|- L___J",
|
||||
" | || | -|- L___J ",
|
||||
"_/ || \\_ ||| .______\\",
|
||||
" || | | | |.____.|",
|
||||
" || / | \\ |L____||",
|
||||
|
|
|
|||
|
|
@ -84,11 +84,14 @@ RouteHead(RouteRoot, arr, argp)
|
|||
P("color: #eee;");
|
||||
P("font-family: sans-serif;");
|
||||
P("}");
|
||||
P("#cols {");
|
||||
P("column-count: 3;");
|
||||
P("min-width: 100%;");
|
||||
P("max-width: 100%;");
|
||||
P("width: 100%;");
|
||||
P("#ascii {");
|
||||
P("text-align: center;");
|
||||
P("color: #be1337;");
|
||||
P("font-size: 4vw;");
|
||||
P("}");
|
||||
P("#ascii pre {");
|
||||
P("display: inline-block;");
|
||||
P("text-align: left;");
|
||||
P("}");
|
||||
P("img {");
|
||||
P("image-rendering: pixelated;");
|
||||
|
|
@ -115,6 +118,7 @@ RouteHead(RouteRoot, arr, argp)
|
|||
|
||||
P("<body>");
|
||||
{
|
||||
size_t i;
|
||||
P("<center>");
|
||||
P("<h1>Your %s is running, all with that %s!</h1>", NAME, CODE);
|
||||
P("</center>");
|
||||
|
|
@ -124,6 +128,15 @@ RouteHead(RouteRoot, arr, argp)
|
|||
P("%s", GetRandomQuote());
|
||||
}
|
||||
P("</i></blockquote>");
|
||||
P("<pre id='ascii'><code>");
|
||||
for (i = 0; i < PARSEE_ASCII_LINES; i++)
|
||||
{
|
||||
XMLElement *e = XMLCreateText(parsee_ascii[i]);
|
||||
XMLEncode(args->stream, e);
|
||||
XMLFreeElement(e);
|
||||
P("<br/>");
|
||||
}
|
||||
P("</code></pre>");
|
||||
|
||||
P("<p>");
|
||||
{
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ XMPPRequestVoice(XMPPComponent *jabber, char *from, char *muc)
|
|||
bool
|
||||
XMPPJoinMUC(XMPPComponent *comp, char *fr, char *muc, bool care)
|
||||
{
|
||||
XMLElement *presence, *x, *reply;
|
||||
XMLElement *presence, *x, *reply, *history;
|
||||
char *from, *id;
|
||||
if (!comp || !fr || !muc)
|
||||
{
|
||||
|
|
@ -185,6 +185,9 @@ XMPPJoinMUC(XMPPComponent *comp, char *fr, char *muc, bool care)
|
|||
XMLAddAttr(presence, "to", muc);
|
||||
XMLAddAttr(presence, "id", (id = StrRandom(8)));
|
||||
XMLAddAttr(x, "xmlns", "http://jabber.org/protocol/muc");
|
||||
history = XMLCreateTag("history");
|
||||
XMLAddAttr(history, "seconds", "3600"); /* TODO: Custom timeout */
|
||||
XMLAddChild(x, history);
|
||||
|
||||
XMLAddChild(presence, x);
|
||||
XMPPAnnotatePresence(presence);
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ typedef struct Argument {
|
|||
extern const char media_parsee_logo[];
|
||||
|
||||
/* An ASCII-art rendition of "小橋" */
|
||||
#define PARSEE_ASCII_LINES 9
|
||||
#define PARSEE_ASCII_LINES 8
|
||||
extern const char *parsee_ascii[PARSEE_ASCII_LINES];
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue