Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 09cd9914 authored by Rob Swindell's avatar Rob Swindell 💬

Add code_prefix property to msg_area.grp[] and file_area.lib[]

These configuration properties were not previously exposed via JS.
parent d1a50dcd
Pipeline #1293 passed with stage
in 9 minutes and 47 seconds
......@@ -38,6 +38,7 @@ static char* lib_prop_desc[] = {
,"library access requirements"
,"library link (for HTML index)"
,"user has sufficient access to this library's directories <i>(introduced in v3.18)</i>"
,"internal code prefix (for directories) <i>(introduced in v3.18c)</i>"
,NULL
};
......@@ -336,6 +337,12 @@ JSBool DLLCALL js_file_area_resolve(JSContext* cx, JSObject* areaobj, jsid id)
if(!JS_SetProperty(cx, libobj, "can_access", &val))
return JS_FALSE;
if((js_str=JS_NewStringCopyZ(cx, p->cfg->lib[l]->code_prefix))==NULL)
return JS_FALSE;
val=STRING_TO_JSVAL(js_str);
if(!JS_SetProperty(cx, libobj, "code_prefix", &val))
return JS_FALSE;
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,libobj,"File Transfer Libraries (current user has access to)",310);
#endif
......
......@@ -39,6 +39,7 @@ static char* msg_grp_prop_desc[] = {
,"group description"
,"group access requirements"
,"user has sufficient access to list this group's sub-boards <i>(introduced in v3.18)</i>"
,"internal code prefix (for sub-boards) <i>(introduced in v3.18c)</i>"
,NULL
};
......@@ -526,6 +527,12 @@ JSBool DLLCALL js_msg_area_resolve(JSContext* cx, JSObject* areaobj, jsid id)
if(!JS_SetProperty(cx, grpobj, "can_access", &val))
return JS_FALSE;
if((js_str=JS_NewStringCopyZ(cx, p->cfg->grp[l]->code_prefix))==NULL)
return JS_FALSE;
val=STRING_TO_JSVAL(js_str);
if(!JS_SetProperty(cx, grpobj, "code_prefix", &val))
return JS_FALSE;
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx,grpobj,"Message Groups (current user has access to)",310);
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment