mirror of
https://github.com/ChronosX88/psyced.git
synced 2024-11-13 22:11:02 +00:00
accept.c: moved text.c bit above "%s#%s.c" so it would work for ~user#channels; place/threads: user auth check
This commit is contained in:
parent
7ffe715010
commit
4ff296fff1
@ -384,12 +384,6 @@ object compile_object(string file) {
|
|||||||
return rob;
|
return rob;
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
if (sscanf(file, "%s/text.c", path) && path != "") {
|
|
||||||
rob = clone_object(NET_PATH "text");
|
|
||||||
rob -> sPath(path);
|
|
||||||
D2(if (rob) PP(("DB CLONED: %O becomes %s/text\n", rob, path));)
|
|
||||||
return rob;
|
|
||||||
}
|
|
||||||
if (sscanf(file, "place/%s.c", name) && name != "") {
|
if (sscanf(file, "place/%s.c", name) && name != "") {
|
||||||
#ifdef SANDBOX
|
#ifdef SANDBOX
|
||||||
string t;
|
string t;
|
||||||
@ -441,6 +435,12 @@ object compile_object(string file) {
|
|||||||
#endif
|
#endif
|
||||||
return rob;
|
return rob;
|
||||||
}
|
}
|
||||||
|
if (sscanf(file, "%s/text.c", path) && path != "") {
|
||||||
|
rob = clone_object(NET_PATH "text");
|
||||||
|
rob -> sPath(path);
|
||||||
|
D2(if (rob) PP(("DB CLONED: %O becomes %s/text\n", rob, path));)
|
||||||
|
return rob;
|
||||||
|
}
|
||||||
if (sscanf(file, "%s#%s.c", path, name) && name != "") {
|
if (sscanf(file, "%s#%s.c", path, name) && name != "") {
|
||||||
unless (name = SIMUL_EFUN_FILE->legal_name(name))
|
unless (name = SIMUL_EFUN_FILE->legal_name(name))
|
||||||
return (object)0;
|
return (object)0;
|
||||||
|
2720
world/net/place/#archetype.gen#
Normal file
2720
world/net/place/#archetype.gen#
Normal file
File diff suppressed because it is too large
Load Diff
@ -533,6 +533,12 @@ htget(prot, query, headers, qs, data) {
|
|||||||
int a;
|
int a;
|
||||||
int limit = to_int(query["limit"]) || DEFAULT_BACKLOG;
|
int limit = to_int(query["limit"]) || DEFAULT_BACKLOG;
|
||||||
int offset = to_int(query["offset"]);
|
int offset = to_int(query["offset"]);
|
||||||
|
int authed = checkToken(query) ? 1 : 0;
|
||||||
|
unless (isPublic() || authed) {
|
||||||
|
write("<h1>404</h1>");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
string webact = PLACE_PATH + MYLOWERNICK;
|
string webact = PLACE_PATH + MYLOWERNICK;
|
||||||
// shouldnt it be "html" here?
|
// shouldnt it be "html" here?
|
||||||
sTextPath(query["layout"] || MYNICK, query["lang"], "ht");
|
sTextPath(query["layout"] || MYNICK, query["lang"], "ht");
|
||||||
@ -542,18 +548,7 @@ htget(prot, query, headers, qs, data) {
|
|||||||
htok(prot);
|
htok(prot);
|
||||||
// kommentare + urspruengliche Nachricht anzeigen
|
// kommentare + urspruengliche Nachricht anzeigen
|
||||||
displayHeader("entry");
|
displayHeader("entry");
|
||||||
displayEntry(to_int(query["id"]), checkToken(query) ? 1 : 0);
|
displayEntry(to_int(query["id"]), authed);
|
||||||
#if 0
|
|
||||||
// eingabeformular ohne betreff
|
|
||||||
write("<form action='"+ webact +"' method='GET'>\n"
|
|
||||||
"<input type='hidden' name='request' value='post'>\n"
|
|
||||||
"PSYC Uni: <input type='text' name='uni'><br>\n"
|
|
||||||
"<input type='hidden' name='reply' value='"+ query["comments"] +"'>\n"
|
|
||||||
"<textarea name='text' rows='14' cols='80'>Enter your text here</textarea><br>\n"
|
|
||||||
"<input type='submit' value='submit'>\n"
|
|
||||||
"</form>\n");
|
|
||||||
write("<br><hr><br>");
|
|
||||||
#endif
|
|
||||||
//logView(a < 24 ? a : 12, "html", 15);
|
//logView(a < 24 ? a : 12, "html", 15);
|
||||||
displayFooter();
|
displayFooter();
|
||||||
return 1;
|
return 1;
|
||||||
@ -589,7 +584,7 @@ htget(prot, query, headers, qs, data) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//::htget(prot, query, headers, qs, data, 1); // no processing, just info
|
::htget(prot, query, headers, qs, data, 1); // no processing, just info
|
||||||
|
|
||||||
string export = query["export"] || query["format"];
|
string export = query["export"] || query["format"];
|
||||||
if (export == "js") {
|
if (export == "js") {
|
||||||
|
Loading…
Reference in New Issue
Block a user