mirror of
https://github.com/ChronosX88/psyced.git
synced 2024-12-05 00:22:19 +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;
|
||||
}
|
||||
# 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 != "") {
|
||||
#ifdef SANDBOX
|
||||
string t;
|
||||
@ -441,6 +435,12 @@ object compile_object(string file) {
|
||||
#endif
|
||||
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 != "") {
|
||||
unless (name = SIMUL_EFUN_FILE->legal_name(name))
|
||||
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 limit = to_int(query["limit"]) || DEFAULT_BACKLOG;
|
||||
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;
|
||||
// shouldnt it be "html" here?
|
||||
sTextPath(query["layout"] || MYNICK, query["lang"], "ht");
|
||||
@ -542,18 +548,7 @@ htget(prot, query, headers, qs, data) {
|
||||
htok(prot);
|
||||
// kommentare + urspruengliche Nachricht anzeigen
|
||||
displayHeader("entry");
|
||||
displayEntry(to_int(query["id"]), checkToken(query) ? 1 : 0);
|
||||
#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
|
||||
displayEntry(to_int(query["id"]), authed);
|
||||
//logView(a < 24 ? a : 12, "html", 15);
|
||||
displayFooter();
|
||||
return 1;
|
||||
@ -589,7 +584,7 @@ htget(prot, query, headers, qs, data) {
|
||||
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"];
|
||||
if (export == "js") {
|
||||
|
Loading…
Reference in New Issue
Block a user